Here is my html page. When the user hits submit they are taken to asp page which sends the form information and attachment by email.
Thanks again!
Code:
<div id="wrapper">
<div id="content">
<p><span class="header">Submit Your CV</span>
</p>
<p>Please forward your resume using one of the following methods:</p>
<p><img src="../images/option1.gif" alt="" />
<span class="strong">Complete this Form:</span><br /></p>
<form action="application.asp" name="form" method="post" enctype="multipart/form-data">
<label for="name">Candidate Name: <span class="star">*</span></label> <input type="text" id="name" name="name" title="Enter Your Name" size="18" /><br />
<label for="email">Email: <span class="star">*</span></label> <input type="text" id="email" name="email" title="Enter Your Email" size="18" /><br />
<label for="current_position">Current Position Held Dates To - From: <span class="star">*</span></label> <input type="text" id="current_position" name="current_position" title="Enter Your Current Position" size="18" /><br />
<label for="position_applied">Position Applied For: <span class="star">*</span></label> <input type="text" id="position_applied" name="position_applied" title="Enter the Position Applied For" size="18" /><br />
<label for="education">Educational Background: <span class="star">*</span></label> <input type="text" id="education" name="education" title="Enter Your Education Background" size="18" /><br />
<label for="salary">Salary Expectations: <span class="star">*</span></label> <input type="text" id="salary" name="salary" title="Enter Your Salary" size="18" /><br />
<label for="availability">Available to Start in a New Position: <span class="star">*</span></label> <input type="text" id="availability" name="availability" title="Enter Date of Availablity" size="18" /><br />
<label for="address1">Address 1: <span class="star">*</span></label> <input type="text" id="address1" name="address1" title="Enter first part of your address" size="18" /><br />
<label for="address2">Address 2: <span class="star">*</span></label> <input type="text" id="address2" name="address2" title="Enter second part of address" size="18" /><br />
<label for="country">Country: <span class="star">*</span></label> <input type="text" id="country" name="country" title="Enter your Country" size="18" /><br />
<label for="phone">Phone: <span class="star">*</span></label> <input type="text" id="phone" name="phone" title="Enter your Phone Number" size="18" /><br />
<label for="cv">Upload Your CV:</label> <input type="file" name="fileatt" /><br />
<label for="comments">Additional Comments:</label> <textarea cols="36" rows="12" id="comments" name="comments" title="Enter any additional Comments"></textarea>
<br /><br />
<input type="hidden" name="submitted" value="true" />
<input type="submit" name="submit" value="Submit" title="Send your request" />
<br /><br />
</form>
</div> <!-- end div content -->
</div> <!-- end div wrapper -->
Here's my asp code so far:
PHP Code:
<%
Dim MyBody
Dim Mail
dim name, email, current_position, position_applied, education, salary, availability
dim address1, address2, country, phone, cv, comments, submitted
submitted=Request.Form("submitted")
name=Request.Form("name")
email=Request.Form("email")
current_position=Request.Form("current_position")
position_applied=Request.Form("position_applied")
education=Request.Form("education")
salary=Request.Form("salary")
availability=Request.Form("availability")
comments=Request.Form("comments")
address1=Request.Form("address1")
address2=Request.Form("address2")
country=Request.Form("country")
phone=Request.Form("phone")
cv=Request.Form("fileatt")
'change to address of your own SMTP server
strHost = "mail.elinkisp.com"
' Because of the special ENCTYPE attribute we can no longer use Request.Form,
' we must use Upload.Form instead.
Set Upload = Server.CreateObject("Persits.Upload")
Upload.IgnoreNoPost = True
' capture an upload and save uploaded files (if any) in temp directory
Upload.Save "c:\upload"
If submitted<>"true" Then
%>
<p>You did not press submit!</p>
<%
Else
If (name = "" or email = "") Then
%>
<p>Please enter your name and email</p>
<p><a href="#" onClick="history.go(-1)">Return</a></p><br />
<%
Else
If country = "" Then
%>
<p>Please enter your Country</p>
<p><a href="#" onClick="history.go(-1)">Return</a></p><br />
<%
Else
If (current_position = "" or position_applied = "") Then
%>
<p>Please enter your Current Position and Position Applied for</p>
<p><a href="#" onClick="history.go(-1)">Return</a></p><br />
<%
Else
If education = "" Then
%>
<p>Please enter your education</p>
<p><a href="#" onClick="history.go(-1)">Return</a></p><br />
<%
Else
If salary = "" Then
%>
<p>Please enter your Salary</p>
<p><a href="#" onClick="history.go(-1)">Return</a></p><br />
<%
Else
If availability = "" Then
%>
<p>Please enter your date of availability</p>
<p><a href="#" onClick="history.go(-1)">Return</a></p><br />
<%
Else
If phone = "" Then
%>
<p>Please enter your Phone number</p>
<p><a href="#" onClick="history.go(-1)">Return</a></p><br />
<%
Else
Set Mail = Server.CreateObject("CDONTS.NewMail")
Mail.Host = strHost
Mail.AddAddress Upload.Form("To")
Mail.From = Upload.Form("email")
Mail.To = "info@pfpc.ie"
Mail.Subject = "Job Application Form"
MyBody = "Name: " & name & vbCrLf
MyBody = MyBody & "Email: " & email & VbCrLf
MyBody = MyBody & "Address: " & address1 & VbCrLf
MyBody = MyBody & "Address2: " & address2 & VbCrLf
MyBody = MyBody & "Country: " & country & VbCrLf
MyBody = MyBody & "Phone: " & phone & VbCrLf
MyBody = MyBody & "Education: " & education & VbCrLf
MyBody = MyBody & "Current Position: " & current_position & VbCrLf
MyBody = MyBody & "Position Applied For: " & position_applied & VbCrLf
MyBody = MyBody & "Salary Expectations: " & salary & VbCrLf
MyBody = MyBody & "Availability: " & availability & VbCrLf
MyBody = MyBody & "Comments: " & VbCrLf & comments & VbCrLf
MyBody = MyBody & "Attachment: " & cv & VbCrLf
Mail.Body = MyBody
' Handle attached file via Upload.Files collection.
' Check if a file was indeed uploaded
If Not Upload.Files("fileatt") Is Nothing Then
Mail.AddAttachment Upload.Files("fileatt").Path
End If
' We are done. Send message
Mail.Send
%>
<p>Thank You <% Response.Write(name) %>.<br />Your application has been submitted.</p>
<%
End If
End If
End If
End If
End If
End If
End If
End If
Bookmarks