can anyone see why the below code is not working. I've echo'd out county and user_id and they come out fine but
when I try to use the UPDATE statement it doesn't work, i keep getting failure. Please help.
Regards
$j = $_SESSION['county'];
echo "county = $j";
$a = $_SESSION['user_id'];
echo "user_id = $a";
$query_two = "UPDATE users SET id_county = '$j',
WHERE user_id = '$a'";
$result_two = mysql_query ($query_two);
if ($result_two)
{
echo'sucess';
}
else
{
echo'failure';
}
when I try to use the UPDATE statement it doesn't work, i keep getting failure. Please help.
Regards
$j = $_SESSION['county'];
echo "county = $j";
$a = $_SESSION['user_id'];
echo "user_id = $a";
$query_two = "UPDATE users SET id_county = '$j',
WHERE user_id = '$a'";
$result_two = mysql_query ($query_two);
if ($result_two)
{
echo'sucess';
}
else
{
echo'failure';
}