enemeth Posted June 10, 2007 Share Posted June 10, 2007 Hi there, I need some help if you can i have a form on my site that users will have to fill out and i need all the information emailed to me, can someone show me how to do that ? Thank you Elaine Quote Link to comment Share on other sites More sharing options...
soycharliente Posted June 10, 2007 Share Posted June 10, 2007 You're looking for the mail() function. http://us2.php.net/mail Just POST (method="post") the form fields and manipulate them for teh function. Take a look at that if you you get stuck or something isn't working, just come back and we'll work it out. Quote Link to comment Share on other sites More sharing options...
jaikar Posted June 10, 2007 Share Posted June 10, 2007 Simple ! get the PHPMailer, search in google to download it. put the files in a folder, create a file, say emailme.php, for mailing the contents inlcude the class.phpmailer.php on the first line instantiate the object like this $mail = new PHPMailer(); $mail->IsHTML(true); $mail->IsSMTP(); // telling the class to use SMTP $mail->Host = "localhost"; // SMTP server $mail->From = "the persons email address here, this is the person who fills the form"; $mail->FromName = 'his display name'; // the username, this you can get from the $_POST['firstname'] depending on how you design the form'; you can also copy the above code to the file after the inlcude code. store the values of the form using the Post methos to the variable or the array create an html page, say content.html, you need not save this page also, are you using dreamweaver or frontpage ?.. what ever it is, create the format of how you want the email to be. place the variable name or the array name on the area where you want to display the value of the form example First name - <?=$fname?> or if its array First name <?=$arr_vars[0]?> Last neme <?=lname?> etcetra.... after you finished designing the page, select all, then copy it come to the emaime.php create a variable, say $body, $body = '( copy thecontents here)' within the quotes, make sure the php variables are concatenated properly. assign the $boby to $mail->Body = $body then $mail->Subject = 'Subect here' then .. you are finished $mail->Send(); upto you to handle the error ............................................................ this will help you only if you know something about php and already worked with php... ~J Quote Link to comment Share on other sites More sharing options...
enemeth Posted June 10, 2007 Author Share Posted June 10, 2007 ok you lost me ! ??? Quote Link to comment Share on other sites More sharing options...
Petrushka Posted June 10, 2007 Share Posted June 10, 2007 Hi Elaine I have been looking into this today too, I found this article useful: http://php.about.com/od/advancedphp/ss/mail.htm Have tried and tested, data is sent to the email OK. Hope it helps. Charlie Quote Link to comment Share on other sites More sharing options...
soycharliente Posted June 10, 2007 Share Posted June 10, 2007 Was there something for me? Did you mean to type my name? Or do we have the same name? Quote Link to comment Share on other sites More sharing options...
Petrushka Posted June 10, 2007 Share Posted June 10, 2007 Same name. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.