I am trying to make a view counter that counts every time someone views the page.
my code:
$old_views = $thread_view_count;
$new_views = $thread_view_count + 1;
$sql3 = mysql_query("UPDATE forum_posts SET view_count='.$new_views.' WHERE id='.$thread_id.'");
The counter doesn't update the views of the page. I am not getting any errors, it just doesn't work.
Please help me, I am new to PHP so don't give me a hard time and destroy my self confidence
Thanks
- Sam