I am trying to update my database when a page is visited.
Here is my code
<?php
$con = mysql_connect("localhost","xxx","xxx");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("xxx", $con)or die( "Unable to select database");
$id=$_GET["q"];
$sql="UPDATE audit SET lks =lks+1 WHERE id='$id'" or die(mysql_error());
?>
The database does not update at all?
Can anyone help?