Simple coding for insert data into adatabase in php and mysql.
include "conn.php";
$fieldname1 = $_REQUEST['fieldname1"];
$fieldname2 = $_REQUEST['fieldname2'];
$fieldname3 = $_REQUEST['fieldname3'];
$query = sprintf("INSERT INTO databasename (fieldname1, fieldname2, fieldname3)
VALUES('%s', '%s', '%s')",
mysql_real_escape_string($fieldname1),
mysql_real_escape_string($fieldname2),
mysql_real_escape_string($fieldname3));
$result = mysql_query ($query, $connect);
include "conn.php";
$fieldname1 = $_REQUEST['fieldname1"];
$fieldname2 = $_REQUEST['fieldname2'];
$fieldname3 = $_REQUEST['fieldname3'];
$query = sprintf("INSERT INTO databasename (fieldname1, fieldname2, fieldname3)
VALUES('%s', '%s', '%s')",
mysql_real_escape_string($fieldname1),
mysql_real_escape_string($fieldname2),
mysql_real_escape_string($fieldname3));
$result = mysql_query ($query, $connect);