Posted by Tyno Gendo on 04/10/07 14:05
Arjen wrote:
> Tyno Gendo schreef:
>> I just wondered what methods people used typically when trying to guard
>> against a POSTed script being reloaded at the users browser and
>> effectively re-posting the same data again ?
>>
>> I have some administration forms which call the same PHP page when they
>> postback and the $action variable is taken from the form to signal what
>> action should be taken.
>>
>> I need a good effective and easy way of stopping people from simply
>> clicking reload and posting the data again and wondered what the best
>> method people have found is?
>>
>> Thanks in advance.
>
>
> if ($_POST['whatever'])
> {
> // do stuff
>
> // reload page
> header ("Location: index.php");
> }
>
Ah... excellent idea, what didn't it even cross my mind... hehehe.
Navigation:
[Reply to this message]
|