Jump to content


This topic is now archived and is closed to further replies.


Collect form information and send as an attachment

Recommended Posts

I have a form that application form that collects information from the user then is processed by a form processor and inputs the information into a mysql database. After that is complete it then sends an email with the users information to me. I need to have this information emailed to me as an attachment. Does anyone have any ideas on how to do this? Do I have to write this information to a file on the server then attach that file? Or is there a way I could just duplicate this same information that is in the email but also have it as an attachement as well. Thanks so much!

[code]$to = "mark@somedomain.com";
$message = "ID: $HRS_ApplicantID
Prefix: $HRS_Applicant_namepfx
First Name: $HRS_Applicant_firstname
Middle Name: $HRS_Applicant_middlename
Last Name: $HRS_Applicant_lastname
Suffix: $HRS_Applicant_namesfx
Social Security Number: $HRS_Applicant_ssno
Home Phone: $HRS_Applicant_phone1
Cell Phone: $HRS_Applicant_phone2
Address: $HRS_Applicant_addr
City: $HRS_Applicant_city
State: $HRS_Applicant_state
Zip Code: $HRS_Applicant_zip1st
Referred By: $HRS_Applicant_ReferredBy
Date Added: $HRS_ApplicantDateAdded
Date Available: $HRS_Applicant_DateAvailable
Applicant Employed: $HRS_Applicant_Employed
Contact Current Employer: $HRS_Applicant_InqEmployer
Job Salary: $HRS_Applicant_JobSal
Applied Before: $HRS_Applicant_ApplyBefore
Apply Before Where: $HRS_Applicant_ApplyBeforeWhere
Apply Before When: $HRS_Applicant_ApplyBeforeWhen
Employment Desired 1: $chosenDesired[0]
Employment Desired 2: $chosenDesired[1]
Military: $HRS_Applicant_military
Military Rank: $HRS_Applicant_militaryRank
Military Discharge: $HRS_Applicant_militaryDshrgTyp
Military Notes: $HRS_Applicant_militaryNotes

School1 Type: $HRS_ApplicantSchoolType
School1 Name: $HRS_ApplicantSchoolNameLoc
School1 Yrs Attended: $HRS_ApplicantSchoolYrsAtt
School1 Graduate: $HRS_ApplicantSchoolGraduate
School1 Subjects: $HRS_ApplicantSchoolSubjects

Employment1 Start Date: $HRS_ApplicantEmplyHstryMYStart
Employment1 End Date: $HRS_ApplicantEmplyHstryMYEnd
Emplyment1 Name: $HRS_ApplicantEmplyHstryNameLoc
Employment1 Salary Range: $HRS_ApplicantEmplyHstrySalRnge
Employment1 Position: $HRS_ApplicantEmplyHstryPstn
Employment1 Reason Leaving: $HRS_ApplicantEmplyHstryRsnLv

Reference1 Name: $HRS_ApplicantReferenceName
Reference1 Address: $HRS_ApplicantReferenceAddr
Reference1 Business: $HRS_ApplicantReferenceBsnss
Reference1 Years Known: $HRS_ApplicantReferenceYrsKnwn

mail($to, 'Application Submission', $message); [/code]

Thanks so much! I appreciate any and all help.

Share this post

Link to post
Share on other sites
Too many tutorials...



Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.