In this function you can easily convert user input date format into SQL date format.
this 00/00/0000 to 0000-00-00
Example:
$date = "15/11/2008";
$query = "INSERT INTO TB VALUES('".tosqldate($date)."')";
// result: 2008-11-15
function tosqldate($strdata){
$strdata = trim($strdata);
if($strdata==""){
return "";
}
$arrdate = explode("/",$strdata);
if(count($arrdate) < 3){
return "";
}else{
return $arrdate[2]."-".$arrdate[1]."-".$arrdate[0];
}
}
?>
70+ Creative Font Typography Designs
-
*Font typographic* designs is now more popular and we can notice a surge
for fonts Type work on portfolio sites, Here we have collected* 70+
Creative Fon...
13 years ago
No comments:
Post a Comment