sungpeng Posted April 22, 2009 Share Posted April 22, 2009 $result = mysql_query("SELECT * FROM listings where rid='$rid'"); $row = mysql_fetch_array($result); <SELECT name="address" [b]value="<?php echo"$row[title]"; ?>" [/b] selected> <OPTION value="" >Any</OPTION> <OPTION value="Ang Mo Kio">Ang Mo Kio</OPTION> <OPTION value="Ayer Rajah Estate">Ayer Rajah Estate</OPTION> <OPTION value="Bedok">Bedok</OPTION> </select> Check I need the selected form option box to be mysql data field "selected". Can help modify above code to make it work? Link to comment https://forums.phpfreaks.com/topic/155153-option-box-mysql-data-field-selected/ Share on other sites More sharing options...
Yesideez Posted April 22, 2009 Share Posted April 22, 2009 Check this topic out I wrote some code similar to what you want here: http://www.phpfreaks.com/forums/index.php/topic,248713.msg1164793.html#msg1164793 What do you want to make as the select box? Link to comment https://forums.phpfreaks.com/topic/155153-option-box-mysql-data-field-selected/#findComment-816171 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.