<html>
<head><title>insert record</title>
</head>
<body bgcolor="#996633">
<?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'];
$id=$_POST['id'];
$mobile=$_POST['mobile'];
$mess=$_POST['mess'];

$query="insert into back(name,id,mobile,mess) values('$name','$id','$mobile','$mess')";
$result=mysql_query($query);
if(mysql_affected_rows()>0)
{
echo"<center><h3>successfully submit record</h3></center>";
}
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="fach.php">Check</a></center>
<hr width="30%" color="#003366"/>
</body>
</html>