text, list box...
Posted: Fri Aug 27, 2004 5:42 am
the value can be showed in text box, but can’t show in the list box…
how to show the value in the list box???
thanks...
text box
list box
how to show the value in the list box???
thanks...
text box
Code: Select all
<input maxlength=40 size=40 name=fullname value="<? mysql_select_db($database, $conn);
$result=mysql_query("select * from ".$DBprefix."signup where username = '$nickname'") ;
$number_of_array = mysql_num_rows($result);
while ($number_of_array = mysql_fetch_array($result)){
echo "$number_of_array[fullname]";
}
?>">list box
Code: Select all
<select name=status>
<option value="" selected>Prefer undisclosed</option>
<option value="Single" <?php if(isset($status)&&$status=='Single'){echo('selected');} ?>>Single</option>
<option value="Living together" <?php if(isset($status)&&$status=='Living together'){echo('selected');} ?>>Living together</option>
<option value="Married" <?php if(isset($status)&&$status=='Married'){echo('selected');} ?>>Married</option>
<option value="Separated" <?php if(isset($status)&&$status=='Separated'){echo('selected');} ?>>Separated</option>
<option value="Divorced" <?php if(isset($status)&&$status=='Divorced'){echo('selected');} ?>>Divorced</option>
<option value="Widowed" <?php if(isset($status)&&$status=='Widowed'){echo('selected');} ?>>Widowed</option>
</select>