Hi I am using html and PHP to update a variable in a database table, I have made sure that the html form works correctly and have used echos to make sure the script is running through. It isnt giving me any signs of error but wont update the table. To clarify my html code is working fine as the function is working and all the right echos are coming out. Here is the code I hope someone can enlighten me as to where I am going wrong. Thank you!
<?php
session_start();
$healthyPig = 50;
$userNamer = $_SESSION['rememberMe'];
echo $userNamer;
$connect=(mysql_connect("localhost","lpwd10","lpwd10","lpwd10_proj"));
if (mysql_error())
{
echo "Failed to connect";
}
echo "connected SON";
mysql_query($connect,"UPDATE user SET 'pigHealth' = $healthyPig WHERE userName='$userNamer'");
header('Location: pigManager.php');
echo "Complete";
mysql_close($con);
?>