Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

page access log logs visits twice sometimes 1

Status
Not open for further replies.

MikeT

IS-IT--Management
Feb 1, 2001
376
US
I have a psuedo-login page that I log access to. I take the username from the Form collection and the date/time and write it to the database. Sometimes it logs access for the same user twice, only a second or two apart.

Why is this?
 
The user is pressing the submit button twice, thinking the site isn't going? Try making the submit button disappear through JavaScript on the client side once they press it. Darrell Mozingo
MCSA, A+, Network+, i-Net+, MOUS 2000 Master
 
It could also be the user refreshing the front page where you are logging the visit. Perhaps if you store the date/time without seconds and the ip address, then if they refresh within the first minute and it tries to insert the data again the db won't do it, don't forget to ignore the error.
-Tarwn ------------ My Little Dictionary ---------
Reverse Engineering - The expensive solution to not paying for proper documentation
 
I tryed mozingod approach once, but the user managed to double click the button faster than the javascript could hide it. Users... we can't live without them.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top