Hey,
I have a some forms on my site and if users enter data incorrectly, they are presented with a message, basically it works like this:
if (!$submit)
{
show form
} else {
check form and output errors if need be and provide javascript.back link back to form to correct errors.
}
Problem is, I have this code at the top of all of my pages to check if the user is logged in or not.
// open session for user
session_save_path('path');
session_start();
Now if I have this at the top of the page with the form, if the user has entered data into the fields and makes a mistake, they get an error message and javascript.back link, when they click on that it should take them back to their form with the data they have already filled in, but it's all blank.
Now, if I remove that session_start() code it works fine and the data can be seen?
Any idea on how to fix this and allow the user to see the data already entered if they need to amend things? Otherwise they have to keep entering in their data which is VERY annoying for the user.
Cheers,
Chris