title: Error: Query was empty
body: <pre><code>$nam=$_POST['name'];
  $fname=$_POST['family'];
  $dat=$_POST['date'];
  $bal=$_POST['balance'];
  $curr=$_POST['currency'];
  $con=mysql_connect('localhost', 'xxxx', 'xxxx', 'xxxx');
  $db=mysql_select_db('users',$con);
  $ins=mysql_query("INSERT INTO users (Name, FamilyName, Date, Balance, Currency) VALUES  ('$nam', '$fname', '$dat', '$bal', '$curr'))",$con);
   if (!mysql_query($ins,$con))
  {
   die('Error: ' . mysql_error($con));
  }
  </code></pre>
  
  <p>So guys, I got this code and I am trying to do something like a registration form. I have tripple checked the names of the variables and the query itself is working when executed in SQL database. The thing is when I include it in my php script it returns that the Query was empty. I've looked around but all errors on the Web are around not assigning to a variable or having several insert statements and so on. So my question is why am i getting this when I am actually inputting data from a web form? Error: Query was empty</p>
  
  <p>P.S. 
  Ok so what I mde of this: I removed the check that you said was for a second time that is the if (!mysql_query($ins,$con)) { die('Error: ' . mysql_error($con)); } part now i get execution but it does not really add the entry to the database and i cannot call it. That is the new name.</p>