hi guys,
just been having a big read through some stuff lately on handling forms/validation/redirects etc.
What way would you best recommend to handle the control of events after a form has been submitted. Is it best to use a..
to redirect back to the site index for example or should I have a 'your data has been submitted' page where the user can navigate to wherever they wish. I'm not too sure what is best for this. Originally I would have used a javascript alert being executed from within my PHP code but this is useless for javascript disabled users.
Also, if i do use a php header redirect can a user press the back button and review the form? I really think this is very messy and can lead to double form submissions which is real not what i want.
Any advice or best practices on this would be good. I have had a google and came up with the header redirects but looking some advice from the pros on here. Thanks
just been having a big read through some stuff lately on handling forms/validation/redirects etc.
What way would you best recommend to handle the control of events after a form has been submitted. Is it best to use a..
Code:
header ("location:http://www.site.com");
to redirect back to the site index for example or should I have a 'your data has been submitted' page where the user can navigate to wherever they wish. I'm not too sure what is best for this. Originally I would have used a javascript alert being executed from within my PHP code but this is useless for javascript disabled users.
Also, if i do use a php header redirect can a user press the back button and review the form? I really think this is very messy and can lead to double form submissions which is real not what i want.
Any advice or best practices on this would be good. I have had a google and came up with the header redirects but looking some advice from the pros on here. Thanks