Jump to content

Recommended Posts

Hi Ive been trying have my form for my website be able to be sent to my email with an attachment. I have found out that it requires php coding but it is pretty confusing for me. If anyone can help me with code I would need to do this I would appreciate it very much. Here is the form I have.

 

 

<body>
<a id="top"></a>
<p><img src="Images/beating.gif" width="800" height="350" alt="Animation" Hspace= "200" Vspace= "0" /></p>
<ul class= "navbar">
<li><a href="index.html">Home</a></li>
<li><a href="resumes.html"> Resumes</a></li>
<li><a href="contactus.html">Contact Us</a></li>
</ul>
<br />
<br />
<hr width="100%" />

<p>Please provide your personal information along with your a copy of your resume.</p>
<form name="resume" action="mailto:cbstaffing14@gmail.com" method="post">
<p> First Name:   <input type="text"
id="FirstName" size="30" /></p>
<p> Last Name:   <input type="text" id="LastName"
size="30"/></p>
<p><input type="radio" name="gender" value="Male"
checked="checked"/>Male
<input type="radio" name="gender" value="Female"/>Female</p>
<p> Phone Number:  <input type="text" id="Phone"
size="15"/></p>
<p>Email: <input type="text" id="Email" size="45"/></p>
<p>Address: <input type="text" id="Address" size="70"></textarea></p>
<p>Additional Comments:  <textarea id="Comments" cols="45" rows="5"></textarea></p>
<p>File to upload: <input type="file" id="upfile">
</p>
<p> Do you have at least one year of Medical/Surgical or Telemetry experience?</p>
<p><input type="checkbox"
id="Yes" value="yes"/> Yes</p>
<p>Nursing Level: <select id="Level" size+"1">
<option>LVN</option>
<option>RN</option>
</select></p>
<button type="submit">Submit</button>

</form>

<p><a href="#top">Back to Top</a></p>
</body>

Link to comment
https://forums.phpfreaks.com/topic/297086-form-to-email-with-a-attachment/
Share on other sites

1) The enctype attribute of the HTML form must allow for file uploads. You haven't done that.

2) The action attribute of the HTML form must point to the PHP processing script, not an email address.

3) The file input needs a name attribute.

 

The processing script

 

1) The processing script will need to validate the form submission.

2) The processing script will need to make sure that the file that was uploaded is safe, and of an expected type or types.

 

Email

 

PHP offers a built-in way to send email, and since you are sending an attachment to yourself, you will need to learn how to add the attachment.

 

Please use code tags when adding code to you posts.

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.