I'am learning to make a blog in CodeIgniter 2.x . What I want - when user clicks on the link readmore on the blog's page, it will redirect him to the page with corresponding id
to show him a full article.
Now, while retrieving a $query->row();
from a database in content_model.php
, i want to update a viewed
column in database at the same time. So instead of showing him for example 34 views
, it will show 35 views
, and when someone open the same link it will shows him by one more - 36 views
.
What's the best way to do it without making it vulnerable to hackers somehow ?
Thank you in advance for any help.