I have created a form.php with 2 fields that successfully send data to process.php that inserts it in a MySQL database table. It works just fine. An Id for each field is given automatically and the 2 fields are inserted.
My problem is that I need to send data with an URL from a Java Applet and that the page process.php should insert that data in the MySQL table. It inserts the ID automatically but the two data fields are empty.
The url I use look like this: process.php?file_name=test6&sound_models=sound6
If I paste the url into the browser or click on a link doesn't matter.
The code in the process.php page look like this:
<?
include 'database/opendb.php';
$file_name = $POST['file_name'];
$sound_models = $POST['sound_models'];
$query = "INSERT INTO jos_dummy (id, file_name, sound_models) VALUES (NULL, '$file_name', '$sound_models')";
mysql_query($query) or die('Error1, insert query failed');
$query = "FLUSH PRIVILEGES";
mysql_query($query) or die('Error2, insert query failed');
echo "New MySQL data added";
include 'database/closedb.php';
?>
I appreciate all help.