therealwesfoster Posted April 3, 2008 Share Posted April 3, 2008 I have a page2.php. On there is a form. A required field is "phone" and the form sends POST to page3.php. On page3.php i want to check if $_POST['phone'] is set, and if not, go back to page2.php and keep the postdata so I can automatically fill-in the form fields. How can i do this? Quote Link to comment Share on other sites More sharing options...
rhodesa Posted April 3, 2008 Share Posted April 3, 2008 I would store it into a session variable. Or, have page2.php POST to itself, then you don't have to redirect if it doesn't validate. Quote Link to comment Share on other sites More sharing options...
therealwesfoster Posted April 3, 2008 Author Share Posted April 3, 2008 I would store it into a session variable. Good idea, I'll try it. Or, have page2.php POST to itself, then you don't have to redirect if it doesn't validate. But if it DID validate on page2.php, I would still have to have it redirect to page3.php with the post vars. But thanks for the first suggestion. I'll let you know how it goes. People, feel free to post more solutions. Wes 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.