so i am trying to count view that enter on zoom.php page. also if user keep of refreshing his page than dont add views and i dont want to use function.

i want to store view on my database

image->image_id,user_id,image,image_name,image_view

Have you any knowledge of php sessions? If so, create a session variable for every user that logs in, adding up to the counter stored in your database. Assing a timeout period for the session, so that once the user has been away for that time period (say, 30 minutes), another logon to the site will count as a new visit.

Also, you can refer to this post for more info on setting up a visit counter (contains information about website, address, etc.)

we're greatful

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.