Re: Using a variable in a header...
Posted: Wed Dec 10, 2008 4:56 pm
Have you tried printing out where the URL it's redirecting to?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
<?php
$type = $_POST['type'];
$mode = $_POST['mode'];
$year = $_POST['year'];
$month = $_POST['month'];
$host = $_SERVER['HTTP_HOST'];
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
if($type == "Planner" && $mode == "View") {
$page = "view_planner.php?month=$month&year=$year";
}
if($type == "Planner" && $mode == "Edit") {
$page = "planner_diary.php?month=$month&year=$year";
}
if($type == "Diary" && $mode == "View") {
$page = "view_diary.php?month=$month&year=$year";
}
if($type == "Diary" && $mode == "Edit") {
$page = "edit_diary.php?month=$month&year=$year";
}
?>
<!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="refresh" content="5;url=<?php echo $page ?>" />
</head>
<body>
<div align="center">You are now being redirected to the relevant page. You will be redirected in 3 seconds...<br />
If you are not redirected, please click <a href="<?php echo $page; ?>">here</a>
</div>
</body>
</html>
Hahahah i have this naive way of trusting this forum so i admit i did a google check on CRAP hahahahahahahapapa wrote:What kind of PHP installation ? Wamp, Lamp, Crap ?
Hahanovice4eva wrote:Hahahah i have this naive way of trusting this forum so i admit i did a google check on CRAP hahahahahahahapapa wrote:What kind of PHP installation ? Wamp, Lamp, Crap ?
I think we should take this post straight to UFO equivalent segment of php...HEADER didn't META did!!