Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- Preventing Double submit on refresh/back


Readie - 6:39 pm on May 15, 2010 (gmt 0)


&& ($_POST['hidden_field'] == "hidden_field")

I'm pretty sure that a string "is equal to" 0 - so the "is identical to" comparison should be used here, to prevent users doing any damage during an injection attempt, or exposing any vulnerabilities:

&& ($_POST['hidden_field'] [b]===[/b] "hidden_field")

Just to be safe :)


Thread source:: http://www.webmasterworld.com/php/4131929.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com