<?php
include("include/dbconnect.php");
extract($_REQUEST);

$motor1=$_REQUEST['uname'];


$mq=mysql_query("select max(id) from eyetbl");
$mr=mysql_fetch_array($mq);
$id=$mr['max(id)']+1;
$rdate=date("d-m-Y");
$sts='1';

if($motor1!="")
{
$qry=mysql_query("insert into eyetbl(id,m1,rdate,Status) values($id,'$motor1','$rdate','$sts')");
if($qry)
{
echo "success";
    
}
else
{
echo "failed";
}
}
?>