php checking textbox containing a date field -
im using php , im checking if textbox empty (this textbox contains date field)
i have
$startperiod = date("y-m-d",strtotime($startperiod)); if(empty($startperiod){ // }
this if statement not work because when date field empty gets defaulted "1969-12-31"
how can fix can check if date field textbox empty?
wrap if condition
if($startperiod != "") { $startperiod = date("y-m-d",strtotime($startperiod)); if(empty($startperiod){ // } }
Comments
Post a Comment