title: Submit data to Mysql without a form through php
body: <p>I have a C# program that needs to pass specific values to our remote server nightly.</p>
  
  <p>I already have a database "counter" with just a few tables: ClientID, ClientName, BoxesMoved, and ReportDate.</p>
  
  <p>I need to pass the values through a simple post command WITHOUT THE USE OF A FORM, but things aren't working properly. Here's what I was starting with.</p>
  
  <p>I was trying to pass the values like this: ( <strong>test.php?clientid=01?clientname=theclient?boxesmoved=185443?reportdate=07-17-2015</strong>) but you more experienced developers know, this didn't work.  Is this possible, and where can I find any information to aid me in my process.</p>
  
  <pre><code>&lt;?php
  $host="localhost"; // Host name 
  $username="root";   // Mysql username 
  $password="password"; // Mysql password 
  $db_name="counter"; // Database name 
  $tbl_name="boxcounter"; // Table name 
  
  // Connect to server and select database.
  mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
  mysql_select_db("$db_name")or die("cannot select DB");
  
  // Get values from form 
  $clientid=$_POST['ClientID'];
  $clientname=$_POST['ClientName'];
  $boxesmoved=$_POST['BoxesMoved'];
  $reportdate=$_POST['ReportDate'];
  
  // Insert data into mysql 
  $sql="INSERT INTO $tbl_name(reportdate, clientid, boxesmoved, clientname)VALUES('$ClientID', '$ClientName', '$BoxesMoved', '$ReportDate', )";
  $result=mysql_query($sql);
  
  // if successfully insert data into database, displays message "Successful". 
  if($result){
  echo "Successful";
  }
  
  else {
  echo "ERROR";
  }
  ?&gt; 
  
  &lt;?php 
  // close connection 
  mysql_close();
  ?&gt;
  </code></pre>