blastbum
09-05-2005, 09:11 AM
Hi,
I really need to know how to put some kind of a condition on a drop down menu.
For example, here's the html code for a php mail form that contains the drop down menu (it's called 'state'):
<FORM ACTION="mailer.php" METHOD="POST">
<td height="260"></td>
<td rowspan="2" valign="top"><p><font size="2" face="Helvetica, Arial, sans-serif">Contact
Name:
<input name="name" type="text" id="name" size="22">
Business Name:
<input name="company" type="text" id="company" size="22">
</font></p>
<p><font size="2" face="Helvetica, Arial, sans-serif">Address:
<input name="address" type="text" id="address" size="16">
Suburb:
<input name="suburb" type="text" id="suburb" size="12">
State:
<select name="state" id="state">
<option value="NSW">NSW</option>
<option value="QLD">QLD</option>
<option value="SA">SA</option>
<option value="VIC">VIC</option>
</select>
Postcode:
<input name="postcode" type="text" id="postcode" size="4">
</font></p>
<p><font size="2" face="Helvetica, Arial, sans-serif">Phone
No:
<input name="phone" type="text" id="phone" size="12">
Fax:
<input name="fax" type="text" id="fax" size="12">
Email:
<input name="email" type="text" id="email" size="24">
</font></p>
<p><font size="2" face="Helvetica, Arial, sans-serif">Comments:<br>
<textarea name="comment" cols="70" id="comment"></textarea>
</font></p>
<p><font size="1" face="Helvetica, Arial, sans-serif">
<input type="checkbox" name="checkbox" value="REQUESTS NEWSLETTER">
Include me in your monthly newsletter mailing
list? (Your details will be kept in our secure
database) </font></p>
<p>
<input type="submit" name="Submit" value="Submit">
<input name="reset" type="reset" id="reset" value="Reset">
</p>
</td>
<td></td>
</FORM>
Once again, the drop down menu is called 'state'. Each of these states "NSW, QLD, SA, VIC" (Australian states) each have a separate email address.
If the user selects "VIC" for example on the drop down menu and then clicks on "Submit" then I would like the email to be sent to the VIC email address, just as if they selected NSW then the email should go to the NSW address. Would anybody be so kind as to let me know the code to be able to do this?
Your help will be greatly appreciated!!
Blastbum :cool:
I really need to know how to put some kind of a condition on a drop down menu.
For example, here's the html code for a php mail form that contains the drop down menu (it's called 'state'):
<FORM ACTION="mailer.php" METHOD="POST">
<td height="260"></td>
<td rowspan="2" valign="top"><p><font size="2" face="Helvetica, Arial, sans-serif">Contact
Name:
<input name="name" type="text" id="name" size="22">
Business Name:
<input name="company" type="text" id="company" size="22">
</font></p>
<p><font size="2" face="Helvetica, Arial, sans-serif">Address:
<input name="address" type="text" id="address" size="16">
Suburb:
<input name="suburb" type="text" id="suburb" size="12">
State:
<select name="state" id="state">
<option value="NSW">NSW</option>
<option value="QLD">QLD</option>
<option value="SA">SA</option>
<option value="VIC">VIC</option>
</select>
Postcode:
<input name="postcode" type="text" id="postcode" size="4">
</font></p>
<p><font size="2" face="Helvetica, Arial, sans-serif">Phone
No:
<input name="phone" type="text" id="phone" size="12">
Fax:
<input name="fax" type="text" id="fax" size="12">
Email:
<input name="email" type="text" id="email" size="24">
</font></p>
<p><font size="2" face="Helvetica, Arial, sans-serif">Comments:<br>
<textarea name="comment" cols="70" id="comment"></textarea>
</font></p>
<p><font size="1" face="Helvetica, Arial, sans-serif">
<input type="checkbox" name="checkbox" value="REQUESTS NEWSLETTER">
Include me in your monthly newsletter mailing
list? (Your details will be kept in our secure
database) </font></p>
<p>
<input type="submit" name="Submit" value="Submit">
<input name="reset" type="reset" id="reset" value="Reset">
</p>
</td>
<td></td>
</FORM>
Once again, the drop down menu is called 'state'. Each of these states "NSW, QLD, SA, VIC" (Australian states) each have a separate email address.
If the user selects "VIC" for example on the drop down menu and then clicks on "Submit" then I would like the email to be sent to the VIC email address, just as if they selected NSW then the email should go to the NSW address. Would anybody be so kind as to let me know the code to be able to do this?
Your help will be greatly appreciated!!
Blastbum :cool: