title: Why doesn't this work? :/
body: <p>I don't understand why this doesn't work? It's a register form checking if fields are filled in,password is equal to retype password, and if it doesn't already exist in database.</p>
  
  <p>I get this error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/a4550840/public_html/newreg.php on line 32</p>
  
  <p>But I already put a ';' at line 32 ... I don't understand why this error occurs.</p>
  
  <p>Any help is appreciated :).</p>
  
  <p><strong>EDIT: Fixed that error ^ and added the mysql_real_escape_string , but it doesn't register the information to the database for some reason?</strong></p>
  
  <p><strong>EDIT: It works now :), took away the quotations from the query</strong></p>
  
  <pre><code>&lt;?php
  
  include ('connect.php');
  
  if ($_POST['submit']) {
  
  $username = mysql_real_escape_string($_POST['username']);
  $password = mysql_real_escape_string($_POST['password']);
  $repassword = mysql_real_escape_string($_POST['repassword']);
  $email = mysql_real_escape_string($_POST['email']);
  
  if ($username &amp;&amp; $password &amp;&amp; $repassword &amp;&amp; $email){
  
  
    if ($password == $repassword) {
  
        $check = mysql_query("SELECT * FROM members WHERE username='$username' ");
        $countrows = mysql_num_rows($check);
  
        if ($countrows == 0){
  
            mysql_query("INSERT INTO members ('username','password','email') VALUES      ('$username','$password','$email') ");
  
        } else {
  
          echo 'Username already exists';
  
        }
  
    } else {
  
       echo 'Passwords don'\t match';
    }
  
  
    } else {
  
    echo 'Fill in the fields';  
    }
  
    } else {
  
    echo 'Register please';   
  
  }
  
    ?&gt;
  </code></pre>