Hello:
I have a script which allows me to edit information and update the database. Right now, the script creates grabs everyone in the table and has a link to edit that person.
Instead, I would like to incorporate a select menu so instead of seeing everyone in the table, the person can select the person they want.
Can anyone point me in the right direction as to how I can modify that portion of the script to include a select menu?
This is the portion of the script that grabs everyone from the table:
[code=php]
if(!isset($choice))
{
//display all the customers
$result = mysql_query(“select * from customer order by id”);
//run the while loop that grabs all the news scripts
while($r=mysql_fetch_array($result))
{
//grab the title and the ID of the news
$fname=$r[“fname”];
$lname=$r[“lname”];
$id=$r[“id”];
$fullname = $fname . ” ” . $lname;
//make the title a link
echo “$fullname <a href=’edit.php?choice=edit&id=$id’>Edit</a>”;
echo “<br>”;
}
}
?>
[code=php]
The line that actually displays the names with the edit link is the following:
echo “$fullname <a href=’edit.php?choice=edit&id=$id’>Edit</a>”;
Instead of the above line, I would like it to be a select menu.
I hope someone can help.
Thank you.