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

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -