Hi,
This is my first PHP web app and I am I getting stuck with this:
I have a site where the user logs in under a session. Once logged in, there is a web form that has to be filled out. I have a script that validates the input, but I am having problems giving feeback to the user.
What I have done (hope this is enough info):
I use the 'post' action on the form.
This calls the php script that validates the input.
Using the echo command, I give feedback as to what fields have not been filled in correctly.
What I wish to do then is either:
i. Have the form re-displayed under the error message so that the user can modify it.
ii. Have a way to get back to the form with the input data still shown so that the user does not have to re-input all data.
I tried just writing include("nameofformfile.php" under the echo statement that gives the error, but I get the error message:
Warning: Cannot send session cache limiter - headers already sent.
I hope that makes sense.
As I said, this is my first web application and I would really appreciate some help.
Cheers,
Rob
This is my first PHP web app and I am I getting stuck with this:
I have a site where the user logs in under a session. Once logged in, there is a web form that has to be filled out. I have a script that validates the input, but I am having problems giving feeback to the user.
What I have done (hope this is enough info):
I use the 'post' action on the form.
This calls the php script that validates the input.
Using the echo command, I give feedback as to what fields have not been filled in correctly.
What I wish to do then is either:
i. Have the form re-displayed under the error message so that the user can modify it.
ii. Have a way to get back to the form with the input data still shown so that the user does not have to re-input all data.
I tried just writing include("nameofformfile.php" under the echo statement that gives the error, but I get the error message:
Warning: Cannot send session cache limiter - headers already sent.
I hope that makes sense.
As I said, this is my first web application and I would really appreciate some help.
Cheers,
Rob