hey guys, for some weird reason the SQL command isn't updating the table, but if I put an echo after the query so it stops the header from running it updates any ideas??
nothing wrong with the SQL query as if i add echo "." just before the header redirect it updates the table
PHP Code:if ($_POST['action'] == 'accept'){
## accepting the terms
if ($_POST['accepted'] == "1"){
sqlconnect();
## accepted the terms update the database and the session
$query = "UPDATE admin_users SET terms = '1' WHERE userid = ".quote_smart($_SESSION['admin_userid']);
$sql = mysql_query($query) or sqlerrorhandler("(".mysql_errno().") ".mysql_error(), $query, $_SERVER['PHP_SELF'], __LINE__);
// echo $query;
// echo ".";
$_SESSION['admin_terms'] = '1';
if ($sql){
header("Location: ".ADMINURL."adminFrame.php");
}
// $redirect = "true";
}
}
doing my head in now

LinkBack URL
About LinkBacks










Bookmarks