Help with PHP email script

Soldato
Joined
12 May 2005
Posts
12,631
I have this working, but I trying to alter it so that it won't let someone send it unless they have entered all fields, anyone help ? I am new to PHP :(

Code:
<?php

// Details
$message="$phone";
// Mail of sender
$mail_from="$customer_mail";
// From
$headers="from: $name1 $name2 <$mail_from>";

// Enter your email address
$to [email protected]';

$send_contact=mail($to,$subject,$message,$headers);

// Check, if message sent to your email
// display message "We've recived your information"
if($send_contact){
("Location: http://domain.tld/page.php");
}
else {
echo "ERROR";
}
?>

*edit* damn wrong section :(

Can someone move it please?
 
Back
Top Bottom