How to get value from drop down box to e-mail with php
- From: "kandi111777" <kandi@xxxxxxxxxxxxxxxxx>
- Date: 29 Jun 2006 18:17:51 -0700
I have a form that includes a drop down box. I can get all of the other
values to show up in an e-mail except for the drop down box values. Can
someone please help? -- I know the HTML isn't the greatest. The website
was originally created in FrontPage and the form broke. I'm just trying
to help out and fix it for a friend.
sendmail.php
<?
$Name = $_REQUEST['name'] ;
$Comments = $_REQUEST['comments'] ;
$Email = $_REQUEST['email'] ;
$Telephone = $_REQUEST['telephone'];
$Fax = $_REQUEST['fax'];
$Subject = $_REQUEST['subject'];
$SubjectOther = $_REQUEST['subjectother'];
$ContactRequested = $_REQUEST['contactrequested'];
mail( "kandihumpf@xxxxxxxxxxxxxxx", "RCI Waterjets Contact Us Form",
"Name: $Name \n\nComments: $Comments \n\nEmail: $Email
\n\nTelephone: $Telephone \n\nFax: $Fax \n\nSubject: $Subject
\n\nSubject Other: $SubjectOther \n\nContact Requested:
$ContactRequested", "From: kandihumpf@xxxxxxxxxxxxxxx" );
header( "Location: http://www.rciwaterjets.com/Thanks.htm" );
?>
ContactUsNEW.htm
<form method="post" action="sendmail.php">
<p align="center">
<textarea name="comments" rows="8" cols="66">Please Enter your
details here</textarea></p>
<dl>
<dd>
<table width="450">
<tr>
<td width="84" align="right"><font size="2">Name</font></td>
<td width="286" align="center">
<p align="center">
<input name="name" type="text" size="35" maxlength="256"/></td>
<td width="66">Required</td>
</tr>
<tr>
<td width="84" align="right"><font size="2">E-mail</font></td>
<td width="286" align="center">
<p align="center">
<input name="email" type="text" size="35" maxlength="256"/></td>
<td width="66">Optional</td>
</tr>
<tr>
<td width="84" align="right"><font size="2">Tel</font></td>
<td width="286" align="center">
<p align="center">
<input name="telephone" type="text" size="35"
maxlength="256"/></td>
<td width="66">Optional</td>
</tr>
<tr>
<td width="84" align="right"><font size="2">Fax</font></td>
<td width="286" align="center">
<p align="center">
<input name="fax" type="text" size="35" maxlength="256"/></td>
<td width="66">Optional</td>
</tr>
</table>
</dd>
</dl>
<dl>
<dd>
<table width="448">
<tr>
<td width="88" align="right"><select name="Subject" size="1">
<option selected>Web Site</option>
<option>Company</option>
<option>Products</option>
<option>Store</option>
<option>Employee</option>
<option>(Other)</option>
</select> </td>
<td width="38">
<p align="center"><font size="2">Other:</font></td>
<td width="252">
<input name="subjectother" type="text" size="35"
maxlength="256"/></td>
<td width="52"> </td>
</tr>
<tr>
<td width="88" align="right"> </td>
<td width="351" colspan="3"> </td>
</tr>
<tr>
<td width="88" align="right"><input name="contactrequested"
type="checkbox"></td>
<td width="351" colspan="3">
<p align="center">Please contact me as soon as possible regarding
this matter.</td>
</tr>
<tr>
<td width="442" align="right" colspan="4">
<p align="center"><input type="submit"/><input type="reset"
value="Reset" name="B2"></td>
</tr>
</table>
</dd>
</dl>
<p
align="center">
</p>
</form>
.
- Follow-Ups:
- Prev by Date: Re: if/else statement, form-check
- Next by Date: Re: How to get value from drop down box to e-mail with php
- Previous by thread: Session_Start() Hangs after setting Session_Id
- Next by thread: Re: How to get value from drop down box to e-mail with php
- Index(es):
Relevant Pages
|