Hi,
I'm currently working on a site in which a user basically clicks a button repeatedly, gaining 1 extra point each time he clicks it.
Anyway, I'm trying to do a MySQL update so that when the button is clicked, it updates his score in one of the MySQL tables:
<?php
if(isset($_POST['update'])) {
mysql_connect("localhost","XXX","XXX") or die(mysql_error());
mysql_select_db("refrigerator") or die(mysql_error());
$username = $_COOKIE["user"];
mysql_query("UPDATE count SET count='5' WHERE username = '$username'");
}
?>
When the button is clicked, nothing happens - no error, no nothing.
This did work once, when I asked it to change count to '55555', but then I changed something and it stopped working. I did undo everything I did to try and get it working again, but couldn't manage it.
Any help would be appreciated :)