How to use POST and not GET

Hello,

I want to make a database to collect the data from the rfid reader.

My problem: i want to use the $_POST so all the data to be hide from the url.

I have make from the html (for check ) if working and it is working fine when you press the Submit button, now the arduino it self how to press the submit button it self ?

here is the code from the send html

<html>
<title>Manual add rfid card</title>

<head>
<H3><center>Manual add a new rfid card to database.</center></h3>

<hr>



	<a href="rfidmain.html" >Return to main page</a>


	

<form method="POST" action="Ard_Temp_Insert.php">
	Card number: <input type="text" name="Card_Number"  />

	Reader ID: <input type="text" name="Reader_ID"/>

	
	Press button for save data to the database. <input type="submit" name="Save" />
	
</form>


</head>

</html>

And the code from receive PHP

<?php
function get_val ( $val )
{
	return $_POST[$val];

}

$Card_Number = get_val('Card_Number');
if ( $Card_Number == '' )
{
	echo "<font color=red><b>Wrong Card_Number !!!</b></font>";
	exit;
}

$Reader_ID = get_val ('Reader_ID');

if ( $Reader_ID == '' )
{
	echo "<font color=red><b>Wrong Reader_ID !!!</b></font>";
	exit;
}

echo(date_default_timezone_set("Europe/Athens"));
$time = date ("H:i:s");
$date = date ("j-n-Y");

$con = mysql_connect("localhost","user","password");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }


mysql_select_db("arduino_database", $con);

mysql_query("INSERT INTO rfid_card_log (Card_Number, Reader_ID, Date, Time)
VALUES ('$Card_Number', '$Reader_ID','$date','$time')");

mysql_close($con);

?>

<html>
	<center><h3>New record added!</h3></center>

	<meta http-equiv="Refresh" content="2;url=http://localhost/rfid_add.html" />

</html>

The piece of code that i want to send from the Arduino is:

Card number:
** Reader ID: **

** Press button for save data to the database. **

But how can i do submit automatically ?

Thank you in advance.

Here is a topic that covers POST data.
http://arduino.cc/forum/index.php/topic,116838.0.html

Hello Miramar Beach,

Thank you very much. :wink:

Finally i found the solution on autosubmit code on php, the code (in case if someone need it ) is:

<form name="myform" method="post" action="recieve.php">
<input type="hidden" name="user" value="<?php echo $user ?>">
<script language="JavaScript">document.myform.submit();</script></form>