From: Jason S. <jsw...@ya...> - 2004-04-07 04:54:53
|
--- Francisco Ivan Anton Prieto <iva...@oz...> wrote: > Hello. > > I am learning to program with Phrame MVC and I would like to know a > way to protect system from multiple GETs or POSTs queries. > The problem is when one person clicks quickly over a link or a > submit button. It execute action a lot of times without resulting in a > view. > I want to know any php-code suggestion to keep system protected . > > Thanks for your time. Hello, I am not sure what you can do about GET requests. How would you know if it was the same person clicking or multiple people behind a proxy server clicking? As for the POST, you are generally sending the POST data to an Action to handle form processing. I would just add some kind of a sequence number as a hidden value in the form, and then add that to an array in the $_SESSION to see if that version of the form had already been processed. If so, abort processing (perhaps throw an error message if you use a session based error queue as I detailed in the PHP|A article). HTH Regards, Jason __________________________________ Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway http://promotions.yahoo.com/design_giveaway/ |