aslanandbeez Posted April 25, 2008 Share Posted April 25, 2008 Hey, I'm planning oh having some e-cards on a site, the idea is someone picks one of four designs maybe with a radio or checkbox and fills in their name and email address and the recipient's email address and name which along with the picture and a message get sent to them. I have a vague idea about some of the aspects, but can anybody point me in the righ direction of what i might need to do, or better yet a kind of tutorial? Anybody helping me will earn some serious karma points Quote Link to comment Share on other sites More sharing options...
dptr1988 Posted April 25, 2008 Share Posted April 25, 2008 Well you've got it planned out pretty good! How much do you know? You can get the results from the form with the $_GET['form_name'] or $_POST['form_name'] variables, and replace 'form_name' with the name of your form. You can send mail with the mail() function http://us2.php.net/manual/en/reserved.variables.get.php http://us2.php.net/manual/en/reserved.variables.post.php http://us3.php.net/manual/en/function.mail.php Quote Link to comment Share on other sites More sharing options...
aslanandbeez Posted April 27, 2008 Author Share Posted April 27, 2008 not a great deal, i'm just learning PHP from a dummies book, and i've started going into an O-Reilly book, but before I start using examples, it seems a bit terrifying to put together myself Quote Link to comment Share on other sites More sharing options...
jonsjava Posted April 27, 2008 Share Posted April 27, 2008 <?php $to = $_POST['to']; $subject = "Check out this E-Card you received from ".$_POST['sender_name']; $message = "your message here"; $headers = "From:".$_POST['sender_name']."<".$_POST['from_email'].">\r\n Reply-To: ".$_POST['sender_name']." \r\n X-Mailer: PHP/". phpversion(); mail($to, $subject, $message, $headers); ?> Quote Link to comment Share on other sites More sharing options...
Fadion Posted April 27, 2008 Share Posted April 27, 2008 Id suggest gathering as much information as u can about basic principles, like variables, superglobals, forms, mail etc etc, before u start on a real project. It is a pretty easy one but u need to have some solid understanding of the basics before working on it. The above code will work, only that u need to add the image background and send the email as html by adding a few extra headers. Quote Link to comment Share on other sites More sharing options...
jonsjava Posted April 27, 2008 Share Posted April 27, 2008 I agree with the above post. My code was merely an example on how to send email. To send email with MIME headers, you will need to either know how to use MIME, or get the MIME Mail class from PHPGuru.org Quote Link to comment Share on other sites More sharing options...
aslanandbeez Posted April 27, 2008 Author Share Posted April 27, 2008 Thanks alot this is all helping me 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.