Forum Moderators: open
The form action goes to the asp page where the mail object is created then the email is sent.
My problem is that none of the data is in the email when i recieve it. All the fields have no data in them. Any suggestions will be appreciated.
Thanks
<form name="WorkForUs" method="Post" action="confirmation.asp" enctype="multipart/form-data">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="420" id="AutoNumber1">
<tr>
<td width="168"><i><b>Name:</b></i></td>
<td width="253" colspan="2"><input type="text" name="Name" size="35"></td>
</tr>
<tr>
<td width="168"><i><b>Age:</b></i></td>
<td width="253" colspan="2"><input type="text" name="Age" size="35"></td>
</tr>
<tr>
<td width="168"><i><b>Height:</b></i></td>
<td width="253" colspan="2"><input type="text" name="Height" size="35"></td>
</tr>
<tr>
<td width="168"><i><b>Weight:</b></i></td>
<td width="253" colspan="2"><input type="text" name="Weight" size="35"></td>
</tr>
<tr>
<td width="168"><i><b>Area that you live in:</b></i></td>
<td width="253" colspan="2"><input type="text" name="Area" size="35"></td>
</tr>
<tr>
<td width="168"><i><b><br>
Have you worked before?<br>
</b></i></td>
<td width="127" align="center"><b><i>
<input type="radio" value="0" name="Agency">No</i></b></td>
<td width="126" align="center"><b><i>
<input type="radio" name="Agency" value="1">Yes</i></b></td>
</tr>
<tr>
<td width="168"><i><b>Email address:</b></i></td>
<td width="253" colspan="2"><input type="text" name="Email" size="35"></td>
</tr>
<tr>
<td width="168"><i><b>Phone number:</b></i></td>
<td width="253" colspan="2"><input type="text" name="Phone" size="35"></td>
</tr>
<tr>
<td width="168"><b><i>Picture 1:</i></b></td>
<td width="253" colspan="2"><input type="file" name="File1" size="22"></td>
</tr>
</table>
</center>
</div>
<p align="center">
<input type="submit" name="Submit" value="Submit"><input type="reset" value="Reset" name="Reset"></p>
</form>
Here is the ASP code for the email:
<%
DIM strName, strAge, strHeight, strWeight, strArea, strAgency
DIM strEmail, strPhone, strChoice, objMail
strName = request("Name")
strAge = request("Age")
strHeight = request("Height")
strWeight = request("Weight")
strArea = request("Area")
strAgency = request("Agency")
strEmail = request("Email")
strPhone = request("Phone")
IF strAgency = 1 THEN StrChoice = "Yes" ELSE StrChoice = "No" End IF
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = "someone@domain.com"
objMail.Subject = "Test information with asp email page"
objMail.To = "someone@domain.com"
objMail.Body = "Name: " & strName & vbCrLf & _
"Age: " & strAge & vbCrLf & _
"Height: " & strHeight & vbCrLf & _
"Weight: " & strWeight & vbCrLf & _
"Area: " & strArea & vbCrLf & _
"Worked at an agency before: " & StrChoice & vbCrLf & _
"Email address: " & strEmail & vbCrLf & _
"Phone number: " & strPhone
objMail.Send
Set objMail = nothing
%>
By the way, I was using the Request.Form("variablename") in the asp page and it wasn't working either.
Thanks again.
To just send the values (w/o uploading) should i change that to "text/plain"?
As you can probably tell. I am pretty new at this.