Hepl with transition from PHP 4 to PHP 5
Posted: Mon Mar 16, 2009 10:18 am
Hi all
I was using this php until my host upgrade to PHP 5
here is the code
Thank you
I was using this php until my host upgrade to PHP 5
here is the code
Code: Select all
$my_email = info@ldfconsultant.com;
$continue = "prof_e.html";
if ($_SERVER['REQUEST_METHOD'] != "POST"){exit;}
$message = "";
while(list($key,$value) = each($_POST)){if(!(empty($value))){$set=1;}$message = $message . "$key: $value\n\n";} if($set!==1){header("location: $_SERVER[HTTP_REFERER]");exit;}
$message = stripslashes($message);
$subject = "Received from http://www.ldfconsultant.com";
$headers = "From: " . $_POST['Email'] . "\n" . "Return-Path: " . $_POST['Email'] . "\n" . "Reply-To: " . $_POST['Email'] . "\n";
mail($my_email,$subject,$message,$headers);