Jump to content

submitting Menu Items


jrapin

Recommended Posts

Hello. I've generated a php form that allows a user to make a selection from a drop-down and submit the results to a e-mail address. (Thanks to Orio). Everything is working nicely however, the selection from the menu is not being processeed into the e-mail body. Can someone please tell me why it is not sending ALL the data to the correct place? IN the return e-mail, I'm just getting, "you have selected _____ as your choice". Here is the code I'm using:

<select fruit ="fruit">
<option value="">Choose a Fruit</option>
<option value="">Apples</option>
<option value="">Cherries</option>
<option value="">Grapes</option>
<option value="">Oranges</option>
</select>

<select amount ="amount">
<option value="">Amount</option>
<option value="">One </option>
<option value="">Two </option>
<option value="">Three </option>
<option value="">Four </option>
<option value="">Five </option>
</select>

$message .= "You have selected ".$_POST['fruit']." ".$_POST['amount']." as your food choice\r\n";
Link to comment
Share on other sites

You are correct, you either have to set a value or leave it out all together. The way that you have it coded will give every option a null or blank value, thus submitting no actual data to the form processor.

And I also think that it should be

[code]<select name="fruit">[/code]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.