title: I keep getting 23750 as a password with a post submission
body: <p>I am completely stumped here.  I am creating a simple member system for class and I keep getting "23750" no matter what password variation I type in.  First I thought it was a db issue, so I manually entered one and it was fine.  Then, i echoed out the password to the next page and I am getting 23750 still.  I made the form again from scratch, and the number 23750 does not even remotely exist in any of my code.  Any thoughts?  Here is the code, anyways.</p>
  
  <pre><code>&lt;?php 
  // Check if user is logged in first
  if ($_SESSION['logged_in']) { // user is logged in
      header("Location: members.php");
  }
  $pageTitle = 'Register';
  require('includes/header.php'); ?&gt;
          &lt;div id="content"&gt;
              &lt;h3&gt;Register&lt;/h3&gt;
              &lt;?php
  
          // Check if form has been submitted
          if ($_SERVER['REQUEST_METHOD'] == 'POST') { // user submitted the form
              // Validate info
              // Grab variables
              $email = $_POST['email'];
              $email2 = $_POST['email2'];
              $fname = $_POST['fname'];
              $lname = $_POST['lname'];
              $gender = $_POST['gender'];
              $age = $_POST['age'];
              $address = $_POST['address'];
              $password = $_POST['password'];
              $password2 = $_POST['password2'];
              $pass_hint = $_POST['pass_hint'];
  
              // Check if form was completely filled out
              if ($email != "") { // email was filled out
                  if ($email2) { // verify email was filled out
                      if ($fname) { // first name was filled out
                          if ($lname) { // last name was filled out
                              if ($gender != 'select') { // gender was filled out
                                  if ($age) { // age was filled out
                                      if ($password) { // password was filled out
                                          if ($password2) { // verification password was filled out
                                              if (strlen($password) &gt; 7) { // password is less than 8 characters}
                                                  if ($pass_hint) { // password hint was filled out
                                                      if ($password !== $pass_hint) { // password hint does not equal password
                                                      // All information was entered
                                                      // Check if email and password match each other
                                                          if ($email === $email2) { // emails match
                                                              if ($password === $password2) { // passwords match
                                                                  // all form data is good, now check with database
                                                                  require('includes/database.php'); // Connect to databae
                                                                  // Check if email exists
                                                                  $qry = $dbc-&gt;prepare("SELECT * FROM users WHERE email='$email'");
                                                                  $qry-&gt;execute();
  
                                                                  // Count rows
                                                                  $count = $qry-&gt;rowCount();
                                                                  if ($count != 1) { // email does not exist
                                                                      // All information is good, insert to database
                                                                      // Query database
                                                                      $qry = $dbc-&gt;prepare("INSERT INTO users (email, fname, lname, gender, age, password, pass_hint) VALUES ('$email', '$fname', '$lname', '$gender', '$age', '$password', '$pass_hint');");
                                                                      $qry-&gt;execute();
  
                                                                      // Check if it was submitted successfully
                                                                      $count = $qry-&gt;rowCount();
                                                                      if ($count == 1) { // submitted successfully
                                                                          echo $password;
                                                                          echo 'You have been successfully registered, now forwarding you to the login page...';
                                                                          ?&gt; &lt;meta http-equiv="refresh" content="3;URL='login.php'" /&gt; &lt;?php
                                                                      } else { // error submitting info
                                                                          echo 'There was a system error, please contact the administrator';
                                                                          registration_form();
                                                                      }
                                                                  } else { // email does exist
                                                                      echo 'A user with that email already exists!';
                                                                      registration_form();
                                                                  }
                                                              } else { // passwords do not match
                                                                  echo 'Your passwords must match!';
                                                                  registration_form();
                                                              }
                                                          } else { // emails do not match
                                                              echo 'Your emails must match!';
                                                              registration_form();
                                                          }
                                                      } else { // password hint matches password given
                                                          echo 'Your password hint cannot equal your password!';
                                                          registration_form();
                                                      }
                                                  } else { // password hint was not filled out
                                                      echo 'Please enter a password hint';
                                                      registration_form();
                                                  }
                                              } else { // password is not 8 characters or longer
                                                  echo 'Your password must be 8 characters of longer';
                                                  registration_form();
                                              }
                                          } else { // verification password was not filled out
                                              echo 'Please enter your password twice!';
                                              registration_form();
                                          }
                                      } else { // password aws not filled out
                                          echo 'Please enter a password';
                                          registration_form();
                                      }
                                  } else { // age was not filled out
                                      echo 'Please enter your age';
                                      registration_form();
                                  }
                              } else { // gender was not filled out
                                  echo 'Please select a gender';
                                  registration_form();
                              }
                          } else { // last name was not filled out
                              echo 'Please enter your last name';
                              registration_form();
                          }
                      } else { // first name was not filled out
                          echo 'Please enter your first name';
                          registration_form();
                      }
                  } else {
                      echo 'Please enter your cerification email';
                      registration_form();
                  }
              } else { // email was not filled out
                  echo "Please enter your email address!";
                  registration_form();
              }
  
  
          } else { // user did not submit form, show reg form
              echo "  &lt;form action='register.php' method='post'&gt;
                              &lt;p&gt;email &lt;input type='text' name='email'&gt;&lt;/p&gt;
                              &lt;p&gt;confirm email &lt;input type='text' name='email2'&gt;&lt;/p&gt;
                              &lt;p&gt;first name &lt;input type='text' name='fname'&gt;&lt;/p&gt;
                              &lt;p&gt;last name &lt;input type='text' name='lname'&gt;&lt;/p&gt;
                              &lt;select id='gender' name='gender'&gt;
                                      &lt;option value='1'&gt;Male&lt;/option&gt;
                                      &lt;option value='2'&gt;Female&lt;/option&gt;
                              &lt;/select&gt;
                              &lt;p&gt;age &lt;input type='text' name='age'&gt;&lt;/p&gt;
                              &lt;p&gt;address &lt;input type='text' name='address'&gt;&lt;/p&gt;
                              &lt;p&gt;password &lt;input type='password' name='password'&gt;&lt;/p&gt;
                              &lt;p&gt;confirm pass &lt;input type='password' name='password'&gt;&lt;/p&gt;
                              &lt;p&gt;hint &lt;input type='text' name='pass_hint'&gt;&lt;/p&gt;
                              &lt;p&gt;&lt;input type='submit' name='submit' value='submit'&gt;&lt;/p&gt;
                      &lt;/form&gt;";
          }
  
          ?&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>