Menu list sendmail .php
Posted: Wed Nov 17, 2010 12:29 pm
Hi I am having a problem with the code below I am using to send a simple php email form with no database.
I am not that advanced with php but I want to add a drop down menu to a form I created and not sure how to get get the message (warning not completed) in the field - if(empty($visitortitle)) { - to accept or not to accept?
This is the code in the form:
<td align="left"><select name="visitortitle">
<option>Please Select</option>
<option>Mr</option>
<option>Mrs</option>
<option>Miss</option>
<option>Ms</option>
<option>Dr</option>
</select>
This is the code I have got in the sendemail:
if(empty($visitortitle)) {
echo "<h2><br /><br /><br /><br />Please hit the back button and enter the title drop down box correctly<br />before you try submitting the form again.</h2>\n";
die ( '<a href="forum.html">click here go back and try again</a>' );
}
How can I get this code to recognise that a <option></option> has been selected?
Any help would be appreciated.
Thanks
Gary
I am not that advanced with php but I want to add a drop down menu to a form I created and not sure how to get get the message (warning not completed) in the field - if(empty($visitortitle)) { - to accept or not to accept?
This is the code in the form:
<td align="left"><select name="visitortitle">
<option>Please Select</option>
<option>Mr</option>
<option>Mrs</option>
<option>Miss</option>
<option>Ms</option>
<option>Dr</option>
</select>
This is the code I have got in the sendemail:
if(empty($visitortitle)) {
echo "<h2><br /><br /><br /><br />Please hit the back button and enter the title drop down box correctly<br />before you try submitting the form again.</h2>\n";
die ( '<a href="forum.html">click here go back and try again</a>' );
}
How can I get this code to recognise that a <option></option> has been selected?
Any help would be appreciated.
Thanks
Gary