Thread: PHP Header Help
View Single Post
Re: PHP Header Help
Old
  (#5)
biohazerd87
Moderator by day Waypointer by night
 
biohazerd87's Avatar
 
Status: Offline
Posts: 1,039
Join Date: Apr 2004
Location: Missouri
Default Re: PHP Header Help - 08-01-2005

note this is the action page
PHP Code:
<?php 
/* Step One Code */ 
$name $_POST['name']; // The name field 
$email $_POST['email']; // The email field
$bot $_POST['bot']; // Bot name
$maps $_POST['maps']; // maps to waypoint 
$message $_POST['msg']; // The name field
$subject $_POST['subject']; // The Subject Field
$submit $_POST['Submit']; // submit button. Will be used for security later. 
if(isset($submit)){ 
/* Step Two Code */ 
// Sends the email to an email depending on choice of bot
if ($bot=="csb"){
$to "commonbullet@yahoo.com";
} else {
$to "wpbotsunited@gmail.com";
}
// Get their IP address 
$ip $_SERVER['REMOTE_ADDR'];
 
// Time and date of request 
$date date("j-m-Y H:i:s"); // This will get the date in the format: 5-7-2004 10:10:26 
$msg "Site Generated Email\n:::::::::::Waypoint Request:::::::::::\n\nName: $name\nEmail: $email\nBot: $bot\nIP Address: $ip\nTime and date sent: $date\n\nMaps:\n$Maps\n\nMessage:\n$message\n\nBOT LABEL CODE:\npb = PODbot mm\njb = JoeBot\ncsb = CSBot\nrb = Realbot\nsb = Shrikebot\nhpbb = HPBBot\nrcb = RCBot";
//$subject = "Waypoint Request";// no subject for gmail :)
$headers "From: Waypoints-United"// Will set the from address to whoever is emailing you. 
/* Step Three Code */ 
mail($to$subject$msg$headers); 
/* Step Four Code */ 
//Header AKA thanks page and info on request
header ("Location: http://lan.crazymonkeycomputers.com/rt.htm");

?>
  
Reply With Quote