newbie question on <select> and php.

From: Date: Thu, 21 Dec 2000 18:01:44 +0000
Subject: newbie question on <select> and php.
Groups: php.windows 
Request: Send a blank email to php-windows+get-4582@lists.php.net to get a copy of this message
Ok I will try to be brief and complete. I am enforcing some RI in my tables by loading drop down boxes (ie. select) in forms on my a couple pages where records are added. I also have a few forms that get prepopulated from a table for editing/modifying records. Now, in the above forms for modifying, all fields are populated with current record data except one which just displays the records value as text and below it gives a dropdown (select) in order to change that field and still maintain RI. The problem I am having is that the dropdown defaults to the first retreived item, which of course does not always match the records current value. This forces the person who is modifying the record to make sure that they change the dropdown to equal the current value if that is something they dont want changed since my submit 'updates' all the fields. I am thinking of two options here. One, I can just not allow the field in question to be changed and instead force the record to be deleted and readded which inforces RI. OR, I would like to be able to have the drop down (select) default to the current field value.....did all this make sense? Thanks for any input. --------------------------------- Larry Hotchkiss

« previous php.windows (#4582) next »