Tips adobe photo shop tutorial free photo shop tutorial photo shop online tutoria flash mx tutorial  flash macromedia mx free
flash mx template flash mx training web site web design web site design free web design web 3d wallpaper 3d studio max 3d graphic 3d art 3d studio max tutorial
design forum web design forum graphic design forum Photoshop Tips  adobe photo shop tutorial  photo shop 7 tutorial web site design web site promotion web design web site design free web
Go home [=] Read The Tutorials Chat talk speak learn ... verbalize Flash mx and more photoshop 6 or 7 and more web coding design principles and more Download Free Web Graphic Flash widgets About Flashgimp Contact Flashgimp This is a Chrome Bar, Duh!
esign psd psd template psd file dream weaver 3d art 3d studio max tutorial php php
 template 3d wallpaper 3d studio max 3d graphic
flashgimp -- php tutorial # 5
»»» Send to a friend / tell a friend using php

This example shows you how to add a "tell a friend" about this website website using php. Excellent for making dynamic content on a website or generating income from you revenue partners by rotating their text links.

First of all we need to create our form for entering the friends email address , your name and your email address.

Here is the form example.

<form action = "tellafriend.php" method="post">
Friends email : <input type = "text" name ="friend"><br>
Your name : <input type = "text" name ="yourname"><br>
Your email : <input type = "text" name ="yourmail"><br>
<input type ="submit" value = "tell friend">
</form>

As you can see this sends the form to our script tellafriend.php , this script uses PHP's mail () function. You can change the entries in your own script , the second entry is what is displayed in the emails subject (the title) and the next is the actual message itself.

Here is the code example.

<?php
//send to a friend mail with form values
mail("$friend" , "Flashgimp Rocks" , "Found this great site called http://www.flashgimp.com","From: \"$yourname\" $yourmail\n");
echo ("Your email to $friend has been sent, thank you");

?>


»»» No output... try it on your own page!

You can drop this snippet anywhere you like, it can be either PHP, or HTML or anything else. You will basically have the page with a form and a seperate page called "tellafriend.php"

When the person hits the submit button on the form, his values are posted to the form processor "tellafriend.php" and the info is mailed using php's mail() function.


flashgimp -- Random Advertising Banner

Want to advertise here? Contact Us
 
[|| Admin Only ||] [|| Send Admin Mail ||] [|| Submit A Story For Review ||]



© 2002 flashgimp.com | design by motionrush media labs | hosting by nomosaki | sitemap
flashgimp - a new media forum for designers of all new media formats. Learn, chat, read/write tutorials,
network and grow in the fast paced web world.