I have a problem with DATES ..
i used to get the date from the user as 20-10-2009 and the DB field is DATE not TIMESTAMP
then i use the following line to convert the date to DD-MM-YYYY when being viewed to the user since its stored in the DB as YYYY-MM-DD
date('d-m-Y',strtotime($listdate);

The Problem is when the user dont insert any date and tries to view his inserted data
the date appears like this 30-11-1999

so plz can anyone tell me where that date came FROM ???

It comes from null value of date field.

Option 1
If user don't insert date, then you should do validation which forces user to input date.

Option 2
Insert default date if user do not input.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.