title: SQL php vars syntax error
body: <p>I need help with following part of login php script:</p>
  
  <pre><code>$name = mysqli_real_escape_string($connection, $_POST["login"]);
  $password = mysqli_real_escape_string($connection, $_POST["password"]);
  
  $sql = "SELECT FROM usersdata WHERE user_password = $password AND user_name = $name";
  </code></pre>
  
  <p>The server is giving me following error: </p>
  
  <blockquote>
    <p>"You have an error in your SQL syntax; check the manual that
    corresponds to your MariaDB server version for the right syntax to use
    near 'FROM usersdata WHERE user_password = something AND user_name =
    something' at line 1".</p>
  </blockquote>
  
  <p>Obviously there is a error with writing php variables in query string such as they are, but I dont know exactly how i should contecate them. Its ridiciolous how SQL queries can be sometimes so frustrating when everything else is working perfectly. </p>