RE: Problem with select-tag within a php-script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



the select has to be a name and not the id

the id has to be within the option value!



-----Original Message-----
From: Ruprecht Helms [mailto:rhelms@mayn.de]
Sent: woensdag 2 juli 2003 15:51
To: php-db@lists.php.net
Subject:  Problem with select-tag within a php-script


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


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux