title: How do I insert data into my mySql database using parameters in a URL?
body: <p>I am new to PHP and databases, here is my PHP code:</p>
  
  <pre><code>&lt;?php 
  
  $email = $_POST['Email'];
  $tc = $_POST['TotalCash'];
  $tr = $_POST['TotalReferalls'];
  
  // Connects to your Database 
  mysql_connect("205.178.146.92", "user", "pass") or die(mysql_error()); 
  mysql_select_db("db") or die(mysql_error()); 
  mysql_query("INSERT INTO UserInformation(Email, TotalCash, TotalReferalls) VALUES('$email', '$tc', '$tr')"); 
  Print "Your table has been populated"; 
  ?&gt;
  </code></pre>
  
  <p>and this works when I change <code>$email</code> and all of the variables to a set value, like <code>$email = 'bob@aol.com'</code>, <code>$tc = 3</code>, <code>$tr = 4</code>, but when I try to set it by calling a url (mysite.com/myphp.php?$email='blah@aol.com'&amp;$tc=4&amp;$tr=2) it does not work, please show a working way to set the parameters from the url.</p>
  
  <p>Thanks in advance!</p>