title: Reading line from MySQL database in PHP
body: <p>I tried to read data from my database to find out is I inserted it correctly. However, the following code has some bug. </p>
  
  <pre><code>$pwdcrypt = SHA1($pwd);
  $userregisterquery='INSERT INTO user (email, password) VALUES ('.$email.', '.$pwdcrypt.')';
  echo $userregisterquery;
  mysqli_query($link, $userregisterquery);
  
  //    echo "Kantaan vietiin sähköposti: ".$email. " ja salasana: ".$pwdcrypt;
  
  $usergetdataquery='select email, password FROM user WHERE email=\''.$email.'\'';
  //echo $usergetdataquery; 
  $result =  mysqli_query($link, $usergetdataquery);
  $row = mysqli_fetch_row($result);
  echo "the result is:".print_r($row);
  </code></pre>
  
  <p>It outputs </p>
  
  <pre><code>INSERT INTO user (email, password) VALUES (a.a@a.com, fcf007079136b14ee9632ea2e3b1e85a061f5006)select email, password FROM user WHERE email='a.a@a.com'SELECT user.id FROM user WHERE email = 'a.a@a.com'the result is:1
  </code></pre>
  
  <p>On the other hand, as I check table in terminal, it outputs only the user id I inserted there via terminal who has different e-mail address. Why can't I see that user I inserted via WWW-form?</p>