Hi team,

i write some logic in my page.

here i am using this $x is getting by POST method...
Logic :

if($x>10) { $amount=$amount+400; }

It is working fine.
Hare the problem is after entered into the page...incase user refresh the page that logic repeated. i dont want like that. how can i prevent this refresh option(or) logic should not be repeated.

Please give suggetion...

Edited by sarithak: n/a

5 Years
Discussion Span
Last Post by sarithak

Generally if form post some data on any page, better you do all db related operations or other php coding at top of page and then redirect user to some page using header.


without header you may face problem.
e.g. if user POST data and you have insert query in database and if you won't have header then each time user press refresh there will be record inserted in database every time.


Thaks for ur response....
Taking session variable... and after executed unset the session variable...working...

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.