Jump to content

Collect form information and send as an attachment


maweber98

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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.