A
Anonymous
Guest
<?php
require("../auth_user.inc.php");
require("../conn.inc.php");
$ip4status = 'completed';
$username = $_SESSION['user_logged'];
$sqlstatement = "INSERT INTO user_info (ip4status) value ('$ip4status') WHERE username = $username";
$sql_result = mysql_query($sqlstatement) or die("Couldn't input into database, please contact your system administrator: $sqlstatement - " . mysql_error());
?>
All i want todo is is update a field in the record of the user thats logged in so the column ip4status reads complete
But i keep getting following and i cant work out why
Couldn't input into database, please contact your system administrator: INSERT INTO user_info (ip4status) value ('completed') WHERE username = chris - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE username = chris' at line 1
any ideas, cheers for any help
require("../auth_user.inc.php");
require("../conn.inc.php");
$ip4status = 'completed';
$username = $_SESSION['user_logged'];
$sqlstatement = "INSERT INTO user_info (ip4status) value ('$ip4status') WHERE username = $username";
$sql_result = mysql_query($sqlstatement) or die("Couldn't input into database, please contact your system administrator: $sqlstatement - " . mysql_error());
?>
All i want todo is is update a field in the record of the user thats logged in so the column ip4status reads complete
But i keep getting following and i cant work out why
Couldn't input into database, please contact your system administrator: INSERT INTO user_info (ip4status) value ('completed') WHERE username = chris - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE username = chris' at line 1
any ideas, cheers for any help