> <P><CENTER><FORM NAME="Employees">
> <SELECT NAME="name">
> <OPTION SELECTED VALUE=""></OPTION>
> <OPTION VALUE="John"</OPTION>John
> <OPTION VALUE="Mary"</OPTION>Mary
> </SELECT>
> <INPUT TYPE="submit" VALUE="Submit">
TIA:
You are missing the action and method attributes to the form tag. You
are also missing the closing form tag. I don't know if you accidentally
omitted these when posting your question or if you are actually missing
these in your actual HTML code as well.
Your code should look something like this:
<FORM NAME="Employees" ACTION="form-processor.php" METHOD="POST"> //
You could also use METHOD="GET"
<SELECT NAME="name">
<OPTION SELECTED VALUE=""></OPTION>
<OPTION VALUE="John"</OPTION>John
<OPTION VALUE="Mary"</OPTION>Mary
</SELECT>
<INPUT TYPE="submit" VALUE="Submit">
</FORM>
If you've got all of this in place, but you are still having trouble
gaining access to the variable, it may be that you are using a newer
version of PHP which requires you to access the variable a different way.
Try this:
<?php
$employee = $HTTP_POST_VARS["name"]; // Or $HTTP_GET_VARS if you are
using GET to pass the variables.
?>
Hope this helps,
Christopher
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php