Re: Select List PHP,HTML
| From: | Chuck | Date: | Mon, 23 Aug 2004 19:35:28 +0000 |
| Subject: | Re: Select List PHP,HTML | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-194518@lists.php.net to get a copy of this message | ||
Thanks a lot, that worked perfectly.
"Jay Blanchard" <jay.blanchard@niicommunications.com> wrote in message
news:C8F323573C030A448F3E5A2B6FE2070B035228D4@nemesis...
[snip]
I have been able to create a list with no problem, but now I need to get
the
value of which item is selected in the list. I looked around, but
couldn't
find anywhere that would let me do this.
Here's my code to build the list.
<SELECT name="Company List" multiple size="8">
<?php
$db = new COM("ADODB.Connection");
$dsn = "DRIVER=SQL Server; SERVER=D63WV941;UID=sa;PWD=sa;
DATABASE=BINDER";
$db->Open($dsn);
$rs = $db->Execute("SELECT * from company");
while (!$rs->EOF)
{
$Name = $rs->Fields['Name']->Value;
print "<OPTION>".$Name;
$rs->MoveNext();
}
?>
</Select>
I would appreciate any help I could get with this.
[/snip]
echo $_POST['Company List'];