Heya... I'm completely new for PHP and only use it because a school assignment calls for it.
Problem at hand involves a drop down menu. The simplified html looks like this
< form action="mailer.php" method="post">
Email:
< input type="text" name="email">
Choose:
< select name="stuff 1" size="1">
< option selected value="nothing">< /option>
< option value="option 1">option 1< /option>
< option value="option 2">option 2< /option>
< /select
< input type="submit" value="submit" name="submit">
< /form>
the php scripting, again simplified, looks like this.
< ?
$email = $_REQUEST['email'] ;
$item1 = $_REQUEST['stuff 1'];
$body = "selected: $item1";
mail( "phirephoenix@gmail.com", "subject",
$body, "From: $email" );
}
?>
However when something is selected and submitted, what I get in the inbox is just:
selected:
with no value inputted. any idea why? Any help is greatly appreciated!
ETA: fixed!!! thanks muchly to all!
Problem at hand involves a drop down menu. The simplified html looks like this
< form action="mailer.php" method="post">
Email:
< input type="text" name="email">
Choose:
< select name="stuff 1" size="1">
< option selected value="nothing">< /option>
< option value="option 1">option 1< /option>
< option value="option 2">option 2< /option>
< /select
< input type="submit" value="submit" name="submit">
< /form>
the php scripting, again simplified, looks like this.
< ?
$email = $_REQUEST['email'] ;
$item1 = $_REQUEST['stuff 1'];
$body = "selected: $item1";
mail( "phirephoenix@gmail.com", "subject",
$body, "From: $email" );
}
?>
However when something is selected and submitted, what I get in the inbox is just:
selected:
with no value inputted. any idea why? Any help is greatly appreciated!
ETA: fixed!!! thanks muchly to all!
