Problem with select-tag within a php-script
| From: | Ruprecht Helms | Date: | Wed, 02 Jul 2003 13:50:34 +0000 |
| Subject: | Problem with select-tag within a php-script | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-29023@lists.php.net to get a copy of this message | ||
Hi,
I've some trouble with a select-tag in a php-script.
In a database should be written the ID of a table, the user could select
the recordset by the Name. My problem is that the fieldentry of the
selecttag is not transfered to the executionscript. The different Names
within the recordset are shown correctly.
Here my listing
<?
mysql_connect("localhost","root");
$result=mysql_db_query("chorportal","SELECT * FROM choere ORDER BY
Name");
echo "<select value='chorid'>";
while($row = mysql_fetch_object($result))
{
echo "<option value=\'.$row->ID.\'>";
echo $row->Name;
echo "</option>";
}
echo "</select>";
?>
Regards,
Ruprecht