View Full Version : mail form with image attachment
sujith787
08-13-2007, 01:09 PM
i have a form with 18 data fields like name, age, sex, date of birth, adress, contact number, etc........
and i have one more field for photo attachment.
i want this form details with attached image should come to my mail @gmail.com
can anybody give me the source code to solve this.
and same time i want solution for sending form details and 3 attached images to my mail @ gmail.com
tech_support
08-14-2007, 09:15 AM
Here's a good place to start: http://www.php-mysql-tutorial.com
sujith787
08-14-2007, 09:34 AM
thx and this is wont help me bcoz i already gone through it. plz anybody help
tech_support
08-14-2007, 09:36 AM
1. We won't right full scripts. We can help you through it, not just "gimme the source code" We're not slaves.
2. Learn PHP yourself.
3. Use Google. It has thousands of scripts for this.
4. At least ATTEMPT to write SOME of it yourself.
sujith787
08-14-2007, 11:11 AM
hello mr. tech_suport
i know google and all have lot to learn. and i know how to learn PHP.
ok i have the source code
for mail form here iam seeking solution top mail a form with attachment
if u know the solution tell us else keep ur mouth shut and stand away read whts going here ok
bye
sujith787
08-14-2007, 05:19 PM
anybody there to solve it
tech_support
08-15-2007, 10:08 AM
if u know the solution tell us else keep ur mouth shut and stand away read whts going here ok
Excuse me? Have you got a problem? We're HELPING you. Not DOING it for you. Period.
djr33
08-15-2007, 10:18 AM
http://www.php.net/manual/en/function.mail.php
If you read through the information there, you should be able to create a script that you want. It isn't too difficult to do most of that, and there is information on each step on the page.
Set the form's action to the PHP page with the script to send the email. Use method="post" (or get, if you want the information to appear in the address bar).
$_POST['fieldname'] will be the value of any field sent.
Use that to generate the subject, body and email fields, as well as headers.
For the attachment, this will need to be sent as an attachment, and you can find some information about that in the user posts on the php.net entry on mail().
In short, use:
mail($to,$subjct,$body,$headers);
Where $to is the email, $subject is the subject line and $body is the body text.
$headers will be the various special instructions, such as From, Reply-to, setting the content type as html, or, as you want, adding an attachment.
As tech_support has said, you should start writing this script yourself. If you have a question, we'll do our best to answer, but you can't start flaming people for not writing an entire script, when you haven't even started yourself. If you do get stuck, ask, after you have something as a base.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.