PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hello friends
i am showing the related values of my selected items on the same page. but when i select the item, the system by default show me the first value of the database. can i retain the selected item on the same page?????
<?php
$query="SELECT sno,item FROM desktops";
$result = mysql_query ($query);
echo "<select name='name' value=''>Item Name</option>";
// printing the list box select command
while($nt=mysql_fetch_array($result)){//Array or records stored in $nt
echo "<option value=$nt[sno]>$nt[item]</option>";
/* Option values are added by looping through the array */
}
echo "</select>";// Closing of list box
?>