title: post data to mysql DB from external source using a link
body: <p>I have a web based, php, DB system using mysql. users login, enter data in forms, click submit, and data is entered and can be read, analyzed, reported on, etc etc etc.</p>
  
  <p>now we have a data provider who wants to send data to the mysql DB via a link, an external submission to the DB from a source not logged in to the system</p>
  
  <p>"The most common way of how we get data over to our clients is by posting over our data to your system. In order to do this I would need a URL to post the data to as well as the
  required fields names."</p>
  
  <p>I am not exactly sure what this means.</p>
  
  <pre><code>http://mysite.com/data.php?first_name=bob&amp;last_name=smith  // ??
  </code></pre>
  
  <p>how do i set up, in the above example, data.php, so the data provider can input via the link and not have to post into a form?</p>
  
  <p>Typically, i have an html form like this, on a page we'll call form1.php:</p>
  
  <pre><code>&lt;html&gt;&lt;body&gt;
  &lt;form method="POST" NAME="form1" action="data.php"&gt;
  &lt;input type='text' name='first_name'&gt;
  &lt;input type='text' name='last_name'&gt;
  &lt;input type=submit value="Submit"&gt;
  &lt;/form&gt;
  &lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>data.php looks like this:</p>
  
  <pre><code>&lt;?
  include("dbinfo.inc.php"); // has the access info for the DB, how to connect
  
  $first_name = mysql_real_escape_string($_POST['first_name']);
  $last_name = mysql_real_escape_string($_POST['last_name']);
  
  $query = "INSERT INTO table1 (first_name, last_name) VALUES ('$first_name','$last_name')";
  mysql_query($query);
  mysql_close();
  
  ?&gt; 
  
  
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta HTTP-EQUIV="REFRESH" content="0; url=form1.php"&gt;
  &lt;/head&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>But in this example, the user would have to log in and post to the form. what is the way for the user to generate a link with the pertinent data, and have it submit via data.php not from a form, but directly from a link?</p>
  
  <p>TIA</p>