computerwizard0
New member
I am building a web form using PHP. The form collects a lot of information, so I've divided all of the questions up over multiple pages. The user is able to go back and forth between pages to make changes throughout the whole process. The form keeps track of entries up to the current point by using hidden fields on the form. In the form tag on each page, hidden fields are used loaded with the post data from the previous page. Then, the hidden data gets posted to the next page, and either loaded back into the hidden fields, or loaded into the appropriate text box if that box is on that page.
The problem I'm running into is dealing with carriage returns, new lines, and special characters. I know that I need to use PHP functions to remove the special characters as appropriate, but I'm not sure how to handle if there are any new lines or carriage returns in the text field. If the user presses enter in any multi-line text field, when the data is posted to the next page, all of the post data is gone.
Any ideas?
The problem I'm running into is dealing with carriage returns, new lines, and special characters. I know that I need to use PHP functions to remove the special characters as appropriate, but I'm not sure how to handle if there are any new lines or carriage returns in the text field. If the user presses enter in any multi-line text field, when the data is posted to the next page, all of the post data is gone.
Any ideas?