title: Simple mysql insert into error, query not executing and data not inserting into table
body: <p>I have some insert code like the following: </p>
  
  <pre><code>$a = md5(uniqid(rand(), true));
  
  $query = "INSERT INTO users(email, password, first_name, last_name, active, registration_date, city) VALUES ('$e', SHA('$p'), '$fn', '$ln', '$a', NOW(), '$c')";
  
  $result = mysqli_query($dbc, $query) or trigger_error("Sorry an error happened");
  </code></pre>
  
  <p>and it's not inserting in to the database. The connect code is: </p>
  
  <pre><code>DEFINE ('DBUSER', 'admin');
  DEFINE ('DBPW', 'asd123');
  DEFINE ('DBHOST', '127.0.0.1');
  DEFINE ('DBNAME', 'test');
  
  $dbc = @mysqli_connect(DBHOST, DBUSER, DBPW, DBNAME);
  </code></pre>
  
  <p>I think it has something to do with the SHA or the NOW() commands, it used to work with mysql, but changing it to mysqli is proving differcult. </p>
  
  <p>I've tried adding ".$variable." parentheses to the variables but no luck there. </p>