0

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

3
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by sarithak
0

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.

header('Location:index.php');

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.

0

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.