Jump to content

wanting to create a simple form to print with required fields


galvlo

Recommended Posts

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!

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.