AngelicOne Posted August 3, 2011 Share Posted August 3, 2011 I have a form that is being validated using PHP server side scripting. To show multiple errors, I store it in an array and used foreach to loop through the values and echo it for dislay. I thought i'm finished using PHP validation but I noticed that everytime I submit the form, even though it still contains some errors, all of the values that were inputted resets. Why? When I used javascript, the values remains so whats with PHP? The form's action is also to itself. Link to comment Share on other sites More sharing options...
samgenius Posted August 3, 2011 Share Posted August 3, 2011 I have a form that is being validated using PHP server side scripting. To show multiple errors, I store it in an array and used foreach to loop through the values and echo it for dislay. I thought i'm finished using PHP validation but I noticed that everytime I submit the form, even though it still contains some errors, all of the values that were inputted resets. Why? When I used javascript, the values remains so whats with PHP? The form's action is also to itself.Show your Coding..! Link to comment Share on other sites More sharing options...
justsomeguy Posted August 3, 2011 Share Posted August 3, 2011 If you're not writing the values back to the inputs then they aren't going to keep their values when the page refreshes. It works with Javascript because the page doesn't refresh. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.