Hi there.
I have a form in main.php to insert data on a MySQL page. After submit, form action is process.php which inserts data. In the end of this file, it redirects (header()) to main.php again.
I did this to avoid re-submiting data after reload browser, but it isn't working. If I reload browser, data is inserted again.
I could control this with some cookies, but shouldn't it work like this?
Thanks in advance,
Regards,
MP
Re-submit a form after reload page
Moderator: General Moderators
Re: Re-submit a form after reload page
you should probably look at the header function manual.
1. There should be no output on the browser before you redirect.
2. Please check the syntax in case you might have missed something..
I had trouble even with a space character
1. There should be no output on the browser before you redirect.
2. Please check the syntax in case you might have missed something..
I had trouble even with a space character
Re: Re-submit a form after reload page
Solved.
I was not using a submit button. Instead, I was using a normal button width a onclick event. With a submit button, the method I was using works.
Thanks anyway.
I was not using a submit button. Instead, I was using a normal button width a onclick event. With a submit button, the method I was using works.
Thanks anyway.