Posted on March 10th, 2007
9834 views
In this tutorial on how to make an "Invite your freinds" Box just like the one on this site. To begin with you need to create a the form in which your users will
<form name="FRIENDEMAIL" method="post" action=""> Then you have the phpcode
Firstly we need to split up the email addresses. We use the explode function to do this. $email = explode(",",$emails); Then we need to count how many variables are in the array. We use the count function for this. [code]$message = "[b]YOUR MESSAGE HERE![b] ";[/code] You will want to change the message that is send out. Now we are going to go the iteration (loop) so that the emails are sent.
We start by setting the variable $i = 0 outside the loop and then the loop starts. Im using a while command to loop the emails sent out. The mail function is quite simple. mail('to','Subject','Message','Additional headers'); Thats about it Arutha |