Newbie Question re: Select boxes
| From: | LB | Date: | Thu, 23 Aug 2001 18:46:06 +0000 |
| Subject: | Newbie Question re: Select boxes | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-64157@lists.php.net to get a copy of this message | ||
1) I thought that PHP automatically created variables for all form elements
on a page. When I run this, the dropdown box contains the first item, but
$Report evaluates as null. I am unclear why.
<select name="Report"><BR>
<option value=>1 Test Report A</option>
<option value=>2 Test Report B</option>
<option value=>3 Test Report C</option>
</select>
<? echo ("the value is $Report"); ?>
2) Is there any way for PHP to detect the change even on the dropdown, or do
I need to use javascript?
Thanks in advance, still trying to get a grip on this.
lb