|
-
Nov 20th, 2009, 08:57 AM
#1
Thread Starter
Addicted Member
[RESOLVED] php form mailer
hi guys, need your help on this..any ideas is greatly appreciated..i got this form mailer from this site:
http://www.dtheatre.com/scripts/sour...e/formmail.txt
but how to configure in php the form mailer that if in my form got two options (like this code below) that if the user choose this particular option then it will go to that particular e-mail.
So basically, got two options on the site but will have two e-mails also but not both of them will receive the mail, when the user press the submit button then it will go only to that particular mail in which the user selected.
please help...
but this one works if data is sent to one e-mail
here's the code on my form:
Code:
<form name="form1" method="post" action="formmail.php">
<table width="90%" border="0" cellspacing="0" cellpadding="3">
<tr>
<th width="42%" valign="middle" scope="row"><div align="right"> Type </div></th>
<td width="58%"><select name="Appt_Type" size="1" class="entries">
<option value="Karate">Karate</option>
<option value="Judo">Judo</option>
</select>
<label></label> </td>
</tr>
<tr>
<th valign="middle" scope="row"><div align="right">Preferred Schedule Date </div></th>
<td><input name="P_Date" type="text" class="entries" id="P_Date"></td>
</tr>
<tr>
<th valign="middle" scope="row"><div align="right">Preferred Schedule Time </div></th>
<td><input name="P_Time" type="text" class="entries" id="P_Time"></td>
</tr>
<tr>
<th valign="middle" scope="row"><div align="right">Preferred Location </div></th>
<td><select name="Location" class="entries" id="Location">
<option value="Kar_Vill">The Karate Village</option> 'problem here if the user choose this
'then it will go to preferred e-mail
<option value="Judo_Mount">The Judo Mountain</option>'if the user choose this option
</select></td> 'then will go to particular e-mail
</tr>
<tr>
<th valign="middle" scope="row"><div align="right">Name</div></th>
<td><input name="Name" type="text" class="entries" id="Name"></td>
</tr>
<tr>
<th valign="middle" scope="row"><div align="right">Tel</div></th>
<td><input name="Tel" type="text" class="entries" id="Tel"></td>
</tr>
<tr>
<th valign="middle" scope="row"><div align="right">Email</div></th>
<td><input name="Email" type="text" class="entries" id="Email"></td>
</tr>
<tr>
<th valign="middle" scope="row"><div align="right">Member No. </div></th>
<td><input name="Mem_No" type="text" class="entries" id="Mem_No"></td>
</tr>
<tr>
<th valign="middle" scope="row"><div align="right"></div></th>
<td><input name="Submit" type="submit" class="entries" value="Book Now">
<input name="Reset" type="reset" class="entries" value="Reset">
<input type="hidden" name="subject" value="The Karate_Appt" />
<input type="hidden" name="recipient" value="[email protected]" /> 'problem here I want to put another e-mail
'depending on what option the user choose
'from above selection
<input type="hidden" name="required" value="Appt_Type,Pref_Date,Pref_Time,Location,Name,Tel,Email" />
<input type="hidden" name="missing_fields_redirect" value="http://www.masterxyz.com/error.html" />
<input type="hidden" name="redirect" value="http://www.masterxyz.com/thankyou.html" /></td>
</tr>
</table>
</form>
</th>
</tr>
</table>
The taller the bamboo grows the lower it bends... 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|