<html>
<head><title>insert record</title>
</head>
<body bgcolor="#9999CC">
<?php
$res=mysql_connect("localhost","root","");
if(!$res)
{
die("server cannot found");
}
$res=mysql_select_db("enq");
if(!$res)
{
die("database cannot be found");
}
$name=$_POST['name'];
$state=$_POST['state'];
$city=$_POST['city'];
$email=$_POST['email'];
$mobile=$_POST['mobile'];

$query="insert into enqform(name,state,city,email,mobile) values('$name','$state','$city','$email','$mobile')";
$result=mysql_query($query);
if(mysql_affected_rows()>0)
{
echo"<b><center><h2>successfully submit record</h2></center></b>";
}
else
{
echo "failed to insert record";
}
?>
<hr width="30%" color="#03366"/>
<h2 align="center">Record</h2>
<h5 align="center"><?php echo $query; ?></h5>
<center> <a href="fatch.php">Check</a></center>
<hr width="30%" color="#003366"/>
</body>
</html>