chathu Posted July 26, 2009 Share Posted July 26, 2009 I have a form submission using POST method with 3 forms one by one separately. When the first form (page1.php) successfully filled by the user it should by directed to the next page (page2.php) using NEXT button. After the completion of the 2nd page it should be directed to the 3rd page (page3.php) using NEXT button. If any fields in any form missed by the user before go to next page it should be alert to the user using java script message. At the last page( 3rd page) it could be submitted to the system. and also be able to EDIT, DELETE using EDIT, DELETE buttons. I have already turn on the "register_global" but unfortunately the variables in the 1st page are not passing to the 3rd page. Could someone help me to recover this And give me the necessary steps to do it with example Quote Link to comment Share on other sites More sharing options...
vineld Posted July 26, 2009 Share Posted July 26, 2009 First of all you should definitely NOT turn on register_globals. That is a security risk that you can do well without and it also helps promote bad coding practices. You need to store the passed variables when being submitted, for example in a session. You should also not rely solely on client-side validation if that is what you do now. Quote Link to comment Share on other sites More sharing options...
lynxus Posted July 26, 2009 Share Posted July 26, 2009 Put it all in sessions. ( remember to destroy the session at the end ) As you work through the pages, insert the posted data into the session. on page3 then just grab all the data you want from the session. IE: your username is : $_SESSION['username']; <?php session_start(); $_SESSION['username'] = $_POST['username']; ?> As the guy above said, also dont reply on client side checks.. So make some form of function that you can run vars through to clean out any nasty chars etc Quote Link to comment Share on other sites More sharing options...
chathu Posted July 30, 2009 Author Share Posted July 30, 2009 Thanks for the help for both of you. But it wasn't solved my problem. I turned off the register globals and tried with SESSIONS as u told. But the same problem exists. SESSION variables were passed to the 2nd page but not for 3rd. My submission of the forms done at the 3rd page. So all the variables page 1+page 2+page 3 should be submited at the 3rd page and all the data Should be available to add,edit,delete I appreciate your help very much Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.