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.
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
"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."
I am not exactly sure what this means.
http://mysite.com/data.php?first_name=bob&last_name=smith // ??
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?
Typically, i have an html form like this, on a page we'll call form1.php:
<html><body>
<form method="POST" NAME="form1" action="data.php">
<input type='text' name='first_name'>
<input type='text' name='last_name'>
<input type=submit value="Submit">
</form>
</body></html>
data.php looks like this:
<?
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();
?>
<html>
<head>
<meta HTTP-EQUIV="REFRESH" content="0; url=form1.php">
</head>
</html>
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?
TIA