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
2010-08-13 09:34:31
ok but can i get some idea to get code
santosh pandey
2010-08-13 09:36:50
+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
2010-08-13 09:37:51