Originally posted by uniflare
In my SQL code i always surround my table names with ` , and surround field names with " and surround values with ' , so i would put:
$query = 'UPDATE counter SET "unique"=\''.$unique.'\', "hits"=\''.$hits.'\'';
You are creating problems for yourself by doing that (hence this post 😃 ) as it makes it difficult to debug and read.
Take superworms' suggestion and only put the ' around the actual variables. And also use jernhenriks suggestion of putting mysql_error on the call to mysql_query
$query = "UPDATE counter SET unique='$unique',hits='$hits'";
$result = mysql_query($query)or die(mysql_error());
if ($result) {$check = "true";}
GM