title: Working on a simple php/sql user registration script out of boredom. I'm sure there is an easier way. It does function properly
body: <p>I need to combine all the if statements into one. So, if anyone is a little bore surfing the web I'd appreciate some input =)</p>
  
  <p>I'm currently playing around with some other functions and if anything changes in the mean time I will update.</p>
  
  <p>Thanks!</p>
  
  <pre><code>if($_REQUEST['do'] == 'register') {
      $pass_length = strlen($_POST["password1"]);
      $username_length = strlen($_POST["username"]);
      $name_length = strlen($_POST["name"]);
      $email_length = strlen($_POST["email"]);
  
      if($_POST["verification"] != $_POST["verification_base"]){
          echo "Hey dummy, your verification code does not match!&lt;br&gt;";
          $process = "no";
      }
  
      if($_POST["password1"] != $_POST["password2"]){
          echo "Your damn passwords do not match!&lt;br&gt;";
          $process = "no";
      }
  
      if($pass_length &lt;= "3") {
          echo "Your password needs to be more than 3 characters long!&lt;br&gt;";
          $process = "no";
      }
  
      if($username_length &lt;= "3"){
          echo "Your user name needs to be more than 3 characters long!&lt;br&gt;";
          $process = "no";
      }
  
      if($name_length &lt;= "2"){
          echo "Please enter a name more than 2 characters long!&lt;br&gt;";
          $process = "no";
      }
  
      if ($email_length &lt;= "6"){
          echo "Please enter a valid email address!&lt;br&gt;";
          $process = "no";
      }
  
      $username = $_POST["username"];
      $name = $_POST["name"];
      $email = $_POST["email"];
      $password1 = $post["password1"];
  
      if ($process != "no"){ mysqli_query(
          $con,
          "INSERT INTO $sqlusers (username, password, email) VALUES ('$username', '$password', '$email')"
      );}
  
  }
  </code></pre>