title: Parse error: syntax error, unexpected '$valid' (T_VARIABLE)
body: <pre><code>&lt;?php
      require 'config.php';
  
      if(!empty ($_POST)){
          $nameError  =   null;
          $emailError =   null;
          $mobileError    =   null;
          $addressError   =   null;
  
          $name   =   $_POST['name'];
          $email_address  =   $_POST['email_address'];
          $mobile_no  =   $_POST['mobile_no'];
          $address    =   $_POST['address'];
  
          $valid  =   true;
  
      if(empty($name)){
          $nameError = 'Provide Name.'
          $valid = false;
          }
      if(empty($email_address)){
          $emailError = 'Provide Email Address.'
          $valid = false;
          }else if(!filter_var($email_address, FILTER_VALIDATE_EMAIL)){
          $emailError = 'Provide a valid Email Address.'
          $valid = false;
          }
      if(empty($mobile_no)){
          $mobileError = 'Provide Mobile Number.'
          $valid = false;
          }
      if(empty($address)){
          $addressError = 'Provide Address.'
          $valid = false;
          }
  
      if($valid){
          $connection=Database::connect();
          $connection-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
          $query="INSERT INTO Customers(name,email_address,mobile_no,address) values(?,?,?,?)";
          $exe_query-&gt;$connection-&gt;prepare($query);
          $exe_query-&gt;execute(array,($name,$email_address,$mobile_no,$address));
          Database::disconnect();
          }
  }
  ?&gt;
  </code></pre>