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? Link to comment https://forums.phpfreaks.com/topic/99366-redirect-and-send-post-vars/ 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. Link to comment https://forums.phpfreaks.com/topic/99366-redirect-and-send-post-vars/#findComment-508392 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 Link to comment https://forums.phpfreaks.com/topic/99366-redirect-and-send-post-vars/#findComment-508418 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.