Welcome to WebmasterWorld Guest from 18.206.48.142

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

PHP sendmail doesn't return data from select form

     
6:17 pm on Sep 30, 2007 (gmt 0)

New User

10+ Year Member

joined:Sept 28, 2007
posts:5
votes: 0


My new HTML form contains a number of drop down select boxes. However when the form is submitted this data does not get emailed, it just comes back blank. I am using the $_POST command to return data.
Can anyone explain why this may be happening?
6:35 pm on Sept 30, 2007 (gmt 0)

New User

10+ Year Member

joined:Mar 12, 2007
posts: 26
votes: 0


It's hard to say anything without the source code. Did you set the value attributes on the option tags properly?
9:58 pm on Sept 30, 2007 (gmt 0)

New User

10+ Year Member

joined:Sept 28, 2007
posts:5
votes: 0


The HTML code for drop down selection box is:

<label for="title"><span>Title</span>
<select name="title">
<option value=>Mr</option>
<option value=>Mrs</option>
<option value=>Miss</option>
<option value=>Ms</option>
<option value=>Dr</option>
</select>
</label>

and PHP Sendmail code for selection box is: $_POST['title']

11:46 pm on Sept 30, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 16, 2007
posts:914
votes: 0


They don't have values:
<label for="title"><span>Title</span>
<select name="title">
<option value=>Mr</option>
<option value=>Mrs</option>
<option value=>Miss</option>
<option value=>Ms</option>
<option value=>Dr</option>
</select>
</label>

Should be something like
<label for="title"><span>Title</span>
<select name="title">
<option value="Mr">Mr</option>
<option value="Mrs">Mrs</option>
<option value="Miss">Miss</option>
<option value="Ms">Ms</option>
<option value="Dr">Dr</option>
</select>
</label>

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members