tags:

views:

14

answers:

2

i want to create a button and one text box. now i want user can send any site of link to his friend how can i give this all. can i get any structure of code or can i get code that where i can create this.

A: 

If you use something like PHP mailer on your site then you can integrate that into the mailing and make things really easy for yourself. Just add in the settings, build the e-mail and pass it through the functions that are needed.

gabe3886
ok but can i get some idea to get code
santosh pandey
+1  A: 
<form action="mail.php" method="post">
<label for="email">your friend email</label>
<input name="email" type="edit"/>
<input type="submit" value="send link to friend"/>
</form>
<?
if (isset($_POST('email')) {
  if (!mail($_POST('email'), "Site link", "check this link " . $_SERVER['HTTP_REFERER'])) {
    echo "I couldn't send email, sorry.";
  }
}

?>
jcubic