Hello! I've been at this problem for the past 3 hours and I'm still no further, so I'm hoping one of u lot may be kind enough to help me 🙂
Ok, take the scenario where you have a web page asking for your details to be entered on a form, eg name, phone number, address, etc. Upon the submit button, a seperate script that checks if all details have been entered runs, and then if some details are missing, returns to the form page and lists names of boxes that have been left, ie text in red at the top says u need to fill in name, address, phone number.... etc
My problem is how do I do this?
If there was only one error, I could detect this and pass on a query string from the check script back to the form page using -- header("Location: http://localhost.blah.php?error=name"); -- and the form page would pick up that there is a problem with the 'name' entry.
I started to get stuck when I realised that multiple fields could be left blank, that needed to be detected and reported.
I tried putting all the errors into an array, but by doing that I can't pass on the array using the query string.
If I put all the individual errors onto the query string I would again have to use an array that stored the errors as it detected them, that then expanded onto the query string. The problem with this is that I would need different strings for each error, and then there is all the checking on the form side to make sense of the string, while taking into account that some errors won't be there.
heh, hope you made sense of all that. Basically I need to know if there is an easy way to accomplish the scenario above.
Thanks for any help!!
Paul.