php - Why is my echo variable not displaying upon submission? -


i working on school project php have 2 files, checkblank.php , form.php. displays correctly , submitting form well, not displaying echo $message fields not filled in.

here code:

if(isset($_post['submitted']) , $_post['submitted'] == 'yes') {     foreach($_post $field => $value) {         if(empty($value)) {             $blank_array[] = $field;         }          else {             $good_data[$field] = strip_tags(trim($value));         }     }      if(@sizeof($blank_array) > 0) {          $message = "<p style ='color: red; margin-bottom: 0; font-weight: bold'>                                          have not filled in fields.                                         please fill in the:                          <ul style='color: red; margin-top: 0; list-style: none' >";              foreach($blank_array $value) {                 $message .= "<li>$value</li>";             }             $message .= "</ul>";              echo $message;              extract($good_data);             include ("form.inc");             exit();      }     echo "all fields contain information"; }  else {     include("form.inc"); } 


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -