Code Comments
Programming Forum and web based access to our favorite programming groups.<SELECT name="student" title="Student list">
<OPTION value="">---------------</OPTION>
<?PHP
while ($row = mysql_fetch_array($result)) {
?>
<OPTION value="<?php echo $row[3]?>" title="Select student <?php
echo $row[1]," ", $row[2]?>"> <?php echo $row[3]?></OPTION>
<?php
}
?>
</SELECT>
In this case I've assumed that you'll have in mysql the following table:
row0: id (autoincrement)
row1: Nick name
row2: First name
row3: Last name
You can modify the code as you wish to get what you need.
Alexandru Mihai
Bastien Koert wrote:
> i suggest you google for this...there are a million examples of this
> kind of code
>
> bastien
>
>
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.