ok my problem I have is a little more complex than normal...
Is that ok?
Well here I go
I have created an admin section for updating categories and ad's with in the categories.
Now this is the code, when the submit button is pressed.
if ($_SERVER["REQUEST_METHOD"] == "POST"){
$name = parse_input($name);
$title = parse_input($title);
$description = parse_input($description);
if ($name){
$bd = mysql_connect($mysql_hostname, $mysql_user, $mysql_password);
mysql_select_db($mysql_database, $bd);
mysql_query("UPDATE {$prefix}categories SET name = '$name', title = '$title', description = '$description', pages = '$pages' WHERE id = '$c'");
mysql_close();
header("Location: $u");
exit();
};
};
notice header("Location: $u");
now $u is supposed to represent the last page you were working on.
But for some reason when you submit, you just stay on admin_edit_category.php
instead of returning to the previous page.