this is my code for inserting records into my form which is in html fileInline Code Example Here
<?php
error_reporting(E_ALL ^ E_DEPRECATED);
$connect=mysql_connect("localhost","root","") or die(mysql_error());
$db_select=mysql_select_db("employee",$connect) or die(mysql_error());
if (isset($_POST['id']))
$id=$_POST['id'];
if (isset($_POST['name']))
$name=$_POST['name'];
if (isset($_POST['gender']))
$gender=$_POST['gender'];
if (isset($_POST['mobile']))
$mobile=$_POST['mobile'];
if (isset($_POST['email']))
$email=$_POST['email'];
$qry="insert into emp(id,name,gender,mobile,email) values ('$id','$name','$gender',$mobile,'$email')";
$result=mysql_query($qry) or die(mysql_error());
if($result)
{
echo "DETAILS ADDED SUCCESSFULLY";
}
else
{
echo "TRY AGAIN";
}
?>