Dear Friends,
I ctreate database in mysql database data transfer from PHP form.
Problem: I can not save my Date formate(dd-mm-yy) in to database.
My code is below please,
if($epr=='save'){
// $cid=$_POST['id'];
$edate=$_POST['edate'];
//$edate=date("d-m-y h:i:s a",time());
$ldate=$_POST['ldate'];
//$ldate=date("d-m-y h:i:s a");
$cdetail=$_POST['cdetail'];
$tdetail=$_POST['tdetail'];
$sql1="INSERT INTO tentb(edate,ldate,cdetail,tdetail) VALUES('$edate','$ldate','$cdetail','$tdetail')";
$result1=$conn1->query($sql1);
if($result1){
echo "Data has saved";
header("refresh:2; url=tenderadd.php");}
else{
$msg='Error'. $conn1->connect_error;
header("refresh:2; url=tenderadd.php");
}
}