0

[Solved]Why am I seeing the earlier inputted data When I reload the page ? [You cannot see it here though ]

I'm attaching a small php script here. I am using the value attribute to retain the values when the user presses the submit button . But now when I reload the page , the input fields are still filled with what I have inputted earlier. https://code.sololearn.com/wXd6MeUdv8xU/?ref=app

13th Sep 2020, 3:19 AM
Hima
Hima - avatar
3 Antworten
+ 2
Try to unset($_POST); to destroy the submission data after doing whatever necessary with it. May be better off to redirect somewhere, or to the same page, somehow ... (Edit) Found this one ... https://stackoverflow.com/questions/6320113/how-to-prevent-form-resubmission-when-page-is-refreshed-f5-ctrlr
13th Sep 2020, 3:48 AM
Ipang
+ 1
Ipang That really didn't help me . I figured out a way to deal with this.
13th Sep 2020, 5:42 AM
Hima
Hima - avatar
+ 1
Hima Share the solution here for others who comes to this thread in future
13th Sep 2020, 6:17 AM
Ipang