View Single Post
  #1 (permalink)  
Old 03-22-2007, 11:31 AM
Jaan's Avatar   
Jaan Jaan is offline
Mod
 
Join Date: Dec 2006
Location: Estonia
Age: 17
Posts: 935
Last Blog:
AdStar Ad Control Pa...
Rep Power: 17
Jaan is just really niceJaan is just really niceJaan is just really niceJaan is just really nice
Send a message via MSN to Jaan
Default Invitation script

This simple scrips allows you to send invitations from your site..

PHP Code:
<?php
// Gather info into variables
$email $_REQUEST['email'];
$message $_REQUEST['message'];
$youremail $_REQUEST['youremail'];
$message2 "YourMessageHere!";

// If $email is not set, $message is empty so as $youremail, then show the form
if(!isset($email) && empty($message) && empty($youremail)){
echo 
"<form action='' method='post'>"
    
."<font>Invite your friends</font><br><br>"
    
."<font><b>Email: </b> <input type='text' name='email' size='30'><br>"
    
."<font><b>Your email: </b><input type='text' name='youremail' size='30'><br>"
    
."<font><b>Message: </b><br><textarea name='message' cols='30' rows='5'></textarea><br>"
    
."<input type='submit' value='Invite'>";
}
// If $youremail is empty then show the error
elseif(empty($youremail)){
die(
"Please enter your email!");
}
// If $message is empty then show the error
elseif(empty($message)){
die(
"Please enter your message!");
//If everything is okay let's send our invitation
}else{
$send mail($email"Invitation"$message."

$message2"
"From: $youremail");
// If we can not send this email let's show the error
if(!$send){
echo 
"Can not send your invitation!";
}
// If this invitation was sent then let's show that "Invitation sent" message
else{
echo 
"Invitation sent!";
}
}

?>
I hope you like it..
Regards Jaan
__________________


Cheap & Professional Web Design | Need help? Send a PM

Last edited by Jaan; 03-22-2007 at 02:29 PM.
Reply With Quote

Sponsored Links