hi i have inserted the date value into the database but its showing as
0000-00-00
why like this can anybody help me whats the correct format to insert date
from a drop down list to the database ;
heres my code to handle this :
<?php
include("dmy.php");
echo "<Html><Head></Head>";
$setdate = date("Y-m-d");
if($sdd == "")
{
$sddval = substr(date("Y-m-d"),8,2);
}
else
{
$sddval = $sdd;
}
if($sdm == "")
{
$sdmval = substr(date("Y-m-d"),5,2);
}
else
{
$sdmval = $sdm;
}
if($sdy == "")
{
$sdyval = substr(date("Y-m-d"),0,4);
}
else
{
$sdyval = $sdy;
}
echo "<Form method=\"POST\" Name=\"MIS\" Action=\"get.php\">";
generateDMY("sdd","sdm","sdy","$sddval","$sdmval","$sdyval","1950","MIS");
echo "<br>";
echo "<Input Type=\"Submit\" Name=\"Submit\" Value=\"SUBMIT\"></Form>";
echo "</Html>";
?>
this generates the date
now how to write the php script to insert the date value into the database