hi how to insert date function
Posted: Mon Jun 30, 2008 4:46 am
hi
i designed one webpage it have year, month and date collumn . i desired to filled it in php .after the insertion it will not inserted in data base . other fields are come in to the data base any body can help me
i given the specific code now
$vuname=$_POST["uname"];
$vpass=$_POST["pass"];
$vcpass=$_POST["cpass"];
$vname=$_POST["name"];
$vfname=$_POST["fname"];
$vdob1=$_POST["txtYear"]."/".$_POST["txtMonth"]."/".$_POST["txtDay"];
echo "$vdob1";
$vemail=$_POST["email"];
$vraddr=$_POST["raddr"];
$vbaddr=$_POST["baddr"];
$vophone=$_POST["ophone"];
$vrphone=$_POST["rphone"];
$vmobile=$_POST["mobile"];
$vfax=$_POST["fax"];
$vnob=$_POST["nob"];
$vref=$_POST["ref"];
$vvcode=$_POST["vcode"];
$con = mysql_connect("localhost","root","") or die(mysql_error());
$q="INSERT INTO esas_nuser VALUES (' ','$vuname','$vpass','$vcpass','$vname','$vfname','$vdob1',
'$vemail','$vraddr','$vbaddr','$vophone','$vrphone','$vmobile','$vfax',' $vnob','$vref',' $vvcode')";
mysql_select_db("esas",$con) or die(mysql_error());
mysql_query($q,$con);
mysql_close($con);
i designed one webpage it have year, month and date collumn . i desired to filled it in php .after the insertion it will not inserted in data base . other fields are come in to the data base any body can help me
i given the specific code now
$vuname=$_POST["uname"];
$vpass=$_POST["pass"];
$vcpass=$_POST["cpass"];
$vname=$_POST["name"];
$vfname=$_POST["fname"];
$vdob1=$_POST["txtYear"]."/".$_POST["txtMonth"]."/".$_POST["txtDay"];
echo "$vdob1";
$vemail=$_POST["email"];
$vraddr=$_POST["raddr"];
$vbaddr=$_POST["baddr"];
$vophone=$_POST["ophone"];
$vrphone=$_POST["rphone"];
$vmobile=$_POST["mobile"];
$vfax=$_POST["fax"];
$vnob=$_POST["nob"];
$vref=$_POST["ref"];
$vvcode=$_POST["vcode"];
$con = mysql_connect("localhost","root","") or die(mysql_error());
$q="INSERT INTO esas_nuser VALUES (' ','$vuname','$vpass','$vcpass','$vname','$vfname','$vdob1',
'$vemail','$vraddr','$vbaddr','$vophone','$vrphone','$vmobile','$vfax',' $vnob','$vref',' $vvcode')";
mysql_select_db("esas",$con) or die(mysql_error());
mysql_query($q,$con);
mysql_close($con);