Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 8th, 2012, 02:03 PM
rs1sensen rs1sensen is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2012
Posts: 1 rs1sensen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 26 m 42 sec
Reputation Power: 0
PHP Mailer Sending files From Checkboxes

I'm trying to build a form for my website where users would go to the page, click checkboxes corresponding to various documents, and after entering their name and email address, they would be sent an email with the files attached, and I'd be emailed their information (or have the info go in a database).

Most files are relatively small and emailable, although I would also consider having the email just have links in the body of it that a user could click on to download the files if that is easier to do.

I've put together a basic form in Dreamweaver. What I need help with is finding/editing a php script to actually make the form functional and do what I'd like. From what I've read, it sounds like the phpmailer script is what I want, sending the data to my gmail account, but I'm confused on how to set it up with the functionality I want.

Thanks!


Code:
<body>
<p>Select Your Files...</p>
	
<form id="form1" name="form1" method="post" action="">
  <p>
    <input type="checkbox" name="DocumentA" id="DocumentA" />
    <label for="DocumentA">Document A</label>
  </p>
  <p>
    <input type="checkbox" name="DocumentB" id="DocumentB" />
    <label for="DocumentB">Document B</label>
  </p>
  <p>
    <input type="checkbox" name="DocumentC" id="DocumentC" />
    <label for="DocumentC">Document C</label>
  </p>
  <p>
    <input type="checkbox" name="DocumentD" id="DocumentD" />
    <label for="DocumentD">Document D</label>
  </p>
  <p>
    <label for="Name">Name:</label>
    <input type="text" name="Name" id="Name" />
  </p>
  <p>
    <label for="Email">Email:</label>
    <input type="text" name="Email" id="Email" />
  </p>
  <p>
    <label for="Comments">Comments:</label>
    <input type="text" name="Comments" id="Comments" />
  </p>
  
  <p>
    <input type="reset" name="Reset" id="Reset" value="Reset" />
    <input type="submit" name="Reset" id="Reset" value="Submit" />
  </p>
</form>
</body>

Reply With Quote
  #2  
Old August 9th, 2012, 02:44 PM
Tramontana Tramontana is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2012
Posts: 10 Tramontana User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 28 m 26 sec
Reputation Power: 0
Do things step by step

It's fairly complex to build a multipart MIME email with files attached. I don't know phpmailer; I assume it can do this for you but it would be far simpler to embed links in a plain text email. You wouldn't need anything more than the standard PHP mail() command. At least start that way and once you have it working you can always get more ambitious. (It's not clear from your post whether you've already tried this.)

Do things step by step. If you want to use phpmailer, start by doing the very minimum with it. Write a script that just sends a test message, then look into how to add attachments.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > PHP Mailer Sending files From Checkboxes

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap