Jump to content

e cards


aslanandbeez

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

<?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);
?>

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.