Jump to content

[SOLVED] redirecting


ultratek

Recommended Posts

i cannot figure out why my handle_form will not redirect back to the home page

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Form Feedback</title>
</head>

<body>
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$subject = $_POST['subject'];
$comments = $_POST['comments'];

$name = $name; //senders name
$email = $email; //senders e-mail adress
$recipient = "[email protected]"; //recipient
//$recipient = "[email protected]"; //recipient
//$recipient = "[email protected]"; //recipient

$comments = "$comments...\n\n".$phone;
$subject = $subject; //subject
$header = "From: ". $name . " <" . $email . ">\r\n"; //optional headerfields

mail($recipient, $subject, $comments, $header); //mail command 

echo "Mail has been sent successfully. You are being redirected home.";

header('Refresh: 3; url=index.php');

?>
</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/128287-solved-redirecting/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.