GeekPolice
Welcome to GeekPolice.net!

GeekPolice is a website which provides free Computer Technical Support & Virus/Spyware Removal to our members.

You are currently viewing the forum as "Guest" which doesn't give you the same privilege as members to ask questions or post comments.

Click the Register button below to unlock the limitations of this website and start asking questions to discover new computer knowledge!

Disable refresh

Post new topic   Reply to topic

View previous topic View next topic Go down

Disable refresh

Post by charvie on Sat 21 Feb 2009, 9:00 am

I have a page that uses php and mysql to submit information. Now once the information is submitted I do not want the user to click refresh. The reason why, is it will submit the information again and again. Is there a way to do this?

______________________________


THIS SIGNATURE IS BY::: AGENT COSMIC ----------QUOTE BY:::TECHY

charvie

Advanced Surfer
Advanced Surfer

Posts: 446
Joined: 2008-04-13
Operating System: Windows XP

View user profile

Back to top Go down

Re: Disable refresh

Post by darkagn on Sat 21 Feb 2009, 5:19 pm

I would actually redirect them after their first submit. That is, after they submit their details, redirect them to a home page or a page that displays a successfully submitted message. If you stay on the same page there is no way to stop the user from submitting their details 100 times.

______________________________


There are no stupid questions, only those too stupid to ask for help.

darkagn
Pioneer
Pioneer

Posts: 85
Joined: 2007-12-28
Operating System: Windows XP SP3 at home, Vista Ultimate 64-bit at work

View user profile

Back to top Go down

Re: Disable refresh

Post by charvie on Sat 21 Feb 2009, 5:45 pm

is that the only way? is there a programming language that could help me achieve this?

______________________________


THIS SIGNATURE IS BY::: AGENT COSMIC ----------QUOTE BY:::TECHY

charvie

Advanced Surfer
Advanced Surfer

Posts: 446
Joined: 2008-04-13
Operating System: Windows XP

View user profile

Back to top Go down

Re: Disable refresh

Post by Agent Cosmic on Sat 21 Feb 2009, 9:01 pm

It's call AJAX, web 2. It uses Javascript and XML synchronously.

______________________________

Agent Cosmic

Global Moderator | Developer
Global Moderator | Developer

Posts: 2996
Joined: 2008-03-07
Operating System: Windows XP Professional

View user profile

Back to top Go down

Re: Disable refresh

Post by Programmer on Thu 05 Nov 2009, 8:59 pm

If you stopped the user from refreshing their page, that would be considered controlling the other persons browser and be named a "virus" by many. So, trust me don't use any control over your user, simply set a Session when they click the button, and then on the page you don't want them to submit again, check to see if that session is valid, and if it is just redirect them back to the page that you want them to goto.

Programmer

Newbie Surfer
Newbie Surfer

Posts: 11
Joined: 2009-11-04
Operating System: Windows 7 Ultimate, Ubuntu 9.04, Windows XP Profession SP2

View user profile

Back to top Go down

View previous topic View next topic Back to top


Permissions of this forum:
You cannot reply to topics in this forum