PHP interesse |
|
Dit is de 5e stap van een php script die niet werkt.
Bij de 5e stap blijft hij hangen op index5.php en verstuurd ook geen email. Ziet iemand er een fout in?
<?php
header("Refresh: 5; URL=http://localhost");
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$adress = $_POST['adress'];
$city = $_POST['city'];
$postal = $_POST['postal'];
$country = $_POST['country'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$license = $_POST['license'];
$age = $_POST['age'];
$email3 = "email@hotmail.com";
$name2 = "MyName";
$homepage = "index.html";
$subject = "Register with $homepage";
$message = "Thank you for registering @ $homepage.";
$message2 = "firstname: "." $firstname "."</br>"
$message2 .= "lastname: "." $lastname "."</br>"
$message2 .= "adress: "." $adress "."</br>"
$message2 .= "city: "." $city: "."</br>"
$message2 .= "postal: "." $postal "."</br>"
$message2 .= "country: "." $country "."</br>"
$message2 .= "email: "." $email "."</br>"
$header = "From: " . $name2 . " <" . $email3 . ">\n";
$header .= "Reply-To: " . $name2 . " <" . $email3 . ">\n";
$header .= "X-Priority: 1"; // met of zonder werkt het niet
mail($email, $subject, $message, $header);
mail($email2, $subject, $message2, $header);
mail($email3, $subject, $message2, $header);
?>
Thank you for your sign-up!</br>
You will be redirected in 5 seconds</br>
<a href="index.html">Return to homepage</a>
<?php header("Refresh: 5; URL=http://localhost"); $firstname = $_POST['firstname']; $lastname = $_POST['lastname']; $adress = $_POST['adress']; $city = $_POST['city']; $postal = $_POST['postal']; $country = $_POST['country']; $email = $_POST['email']; $email2 = $_POST['email2']; $license = $_POST['license']; $age = $_POST['age']; $email3 = "email@hotmail.com"; $name2 = "MyName"; $homepage = "index.html"; $subject = "Register with $homepage"; $message = "Thank you for registering @ $homepage."; $message2 = "firstname: "." $firstname "."</br>" $message2 .= "lastname: "." $lastname "."</br>" $message2 .= "adress: "." $adress "."</br>" $message2 .= "city: "." $city: "."</br>" $message2 .= "postal: "." $postal "."</br>" $message2 .= "country: "." $country "."</br>" $message2 .= "email: "." $email "."</br>" $header = "From: " . $name2 . " <" . $email3 . ">\n"; $header .= "Reply-To: " . $name2 . " <" . $email3 . ">\n"; $header .= "X-Priority: 1"; // met of zonder werkt het niet mail($email, $subject, $message, $header); mail($email2, $subject, $message2, $header); mail($email3, $subject, $message2, $header); ?> Thank you for your sign-up!</br> You will be redirected in 5 seconds</br> <a href="index.html">Return to homepage</a>
|