$titles = array("Mr.","Ms.","Mrs.","Dr.","Capt.");
print "\n";
foreach($titles as $value)
{
if($row['title]==$value) $sel="SELECTED"; else unset($sel);
print "$value\n";
}
print "\n";
- Original Message -
From: "Denis L. Menezes" <[EMAIL PROTECTED]>
To: "PHP general list" <[EMAIL PROTECTED]>
Sent: Tuesday, February 25, 2003 9:08 AM
Subject: [PHP] editing field value using selectbox with options
Hello friends.
In an edit form, I need the following select box.
Mr.
Ms.
Mrs.
Dr.
Capt.
My problem is : since I am getting the selected value from the database and showing it
(for editing
the option value and later updating), I do not know how to show the selected
value(value of the
option from the existing field value in the database) in the edit form(when opening
the edit form)
along with the other option values.
Can someone help? I am using PHP and $row.
Thanks
denis
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php