I’m making a very simple website that’s going to be displayed on a TV in a office. The index.php page is a form, and it has three fields. The form method is post and everything there is correct.
Then I have this piece of code on the next page, the one the form points to after submission.
mysql_select_db("figs", $con);
mysql_query("UPDATE stats SET slots_sold=$_POST[slots_sold], total_figure=$_POST[total_figure], apps_sat=$_POST[apps_sat]");
mysql_close($con);
?>
The problem is that the table is updating SOME of the time and other times it’s not, anyone have any ideas why? It’s really simple I thought it would just work a charm.
try this:
also I would recommend to take a look to mysql PDO