galvlo Posted January 14, 2008 Share Posted January 14, 2008 Hello. I am VERY new to this and I apologize if this has been touched on before but I wasn't able to find what I was looking for in my searches. I am wanting to create a simple webform page where there are a certain amount of fields to fill in and the user will then print the page out. However, I am trying to figure out how to make it to where it won't let them print it out (and give them a message saying so) if all of the required fields aren't filled out. This seems simple but since I am new, it is very overwhelming . Any help would be VERY much appreciated! Quote Link to comment https://forums.phpfreaks.com/topic/85991-wanting-to-create-a-simple-form-to-print-with-required-fields/ Share on other sites More sharing options...
pocobueno1388 Posted January 14, 2008 Share Posted January 14, 2008 All you have to do is check if the required fields are empty, like so <?php if (!isset($_POST['form_field'])){ echo "You didn't fill out the form field!"; } else { //it was filled out } ?> Here are some tutorials on working with forms http://www.tizag.com/phpT/forms.php http://php.about.com/od/learnphp/ss/php_forms.htm Quote Link to comment https://forums.phpfreaks.com/topic/85991-wanting-to-create-a-simple-form-to-print-with-required-fields/#findComment-439141 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.