PRG in a nutshell - a clarification
Posted: Fri Sep 09, 2011 7:21 am
basically the concept of prg is to avoid the double submit problem
We could use three php files for that by making a separate files for data input, process and confirmation.
for example:
1). first page is a form with a single text area where user could input data. this page also specifies what page should be called next.
2.) the page called will not be shown to the user, this page retrieves user input from the first page, tries to connect to the database and would eventually try to insert the data specified by the user. After its work is done, it will try to call the third page. probably will call the third page with the header() function?
3.) the third page gives confirmation to the user that the data is successfully entered. this page is only a front end so people can't reprocess when they try to refresh the browser.
am i missing something?
also...
what is the use of this?
header('HTTP/1.1 303 See Other');
We could use three php files for that by making a separate files for data input, process and confirmation.
for example:
1). first page is a form with a single text area where user could input data. this page also specifies what page should be called next.
2.) the page called will not be shown to the user, this page retrieves user input from the first page, tries to connect to the database and would eventually try to insert the data specified by the user. After its work is done, it will try to call the third page. probably will call the third page with the header() function?
3.) the third page gives confirmation to the user that the data is successfully entered. this page is only a front end so people can't reprocess when they try to refresh the browser.
am i missing something?
also...
what is the use of this?
header('HTTP/1.1 303 See Other');