Checking clicks over two times by same user

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nyy2000
Forum Newbie
Posts: 15
Joined: Tue Jul 12, 2005 12:40 am

Checking clicks over two times by same user

Post by nyy2000 »

I am trying to decrease the server requests when user clicks on the link/submit the form two or more times.
When server is running slow, the page shows slowly, so user is tend to click the link/submit few more times. I want to detect this and cancel the process.
Does PHP have function to check whether the process is already running or not?
Right now, I put some JavaScript code to detect the double clicks and submits, and when the link/form was already clicked/submitted, then it returns false.
Can same sort of things be done in PHP or Apache?

Thanks,
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

No. As far as Apache is concerned every request is seperate.
Post Reply