This is my new updated code, still not working... This time it just leaves a blank page? :S
Code: Select all
<?php
$type = $_POST['type'];
$mode = $_POST['mode'];
$year = $_POST['year'];
$month = $_POST['month'];
if($type == "Planner" && $mode == "View") {
$page = "view_planner.php?month=$month&year=$year";
}
if($type == "Planner" && $mode == "Edit") {
$page = "edit_planner.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";
}
$host = $_SERVER['HTTP_HOST'];
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
header("Location: http://$host$uri/$page");
exit;
?>
I did add in an extra variable, the year, and added that into the $page variable. I removed "Location" from the header statement. Thanks
Edit: Updated with new code, so it works when i move from test server to proper server... Still no luck, although wierdly when i submit the data it just loads the page the form is on...
http://www.ashpea1.exofire.net/Diary/diarycentral.php - if you wnt to test it you have to make an account... And if i put echo statements in, to test the variables, they are all fine 100% and it loads diaryprocess.php which is really, really wierd..
And after checking php.net im 100% sure in need the "Location: " part in the header statement...