ImJustBrndn Posted November 1, 2006 Share Posted November 1, 2006 I've tried searching for this, but couldn't find my exact problem. I have a shopping cart system setup which includes two pages after the cart.php, which are address.php and summary.php. The address.php page takes all the customers information and then forwards it into summary.php which displays the information and submits it in an email to me. I want it so that if they don't fill out one of the forms in address.php it won't let them continue onto summary.php. When they go to summary.php without filling in any information it sends me an e-mail and I just have a bunch of blank e-mails that are annoying. So I want it that if they don't fill it out and aren't ordering anything that address.php won't let them past without first filling in all the forms. Is there anyway to do this make it so that the fields are required and have to be filled in before it can continue onto the next page. Thanks in advance.B Link to comment https://forums.phpfreaks.com/topic/25780-required-fields-and-rejection/ Share on other sites More sharing options...
Orio Posted November 1, 2006 Share Posted November 1, 2006 You can do something simple as that-[code]<?phpforeach($_POST as $name => $value) if(empty($_POST[$name])) die("Please fill in all of the fields!");?>[/code]Orio. Link to comment https://forums.phpfreaks.com/topic/25780-required-fields-and-rejection/#findComment-117724 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.