Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie date question

Status
Not open for further replies.

peterv12

Technical User
Dec 31, 2008
108
US
I'm using a PHP form to populate fields in a MySQL database. Everything is working fine, except for date fields. I've never used them before, and I did search to try to find something that would help, but didn't find what I need. I defined my field like this:

date_of_contact DATE;

That should have a date format of YYYY-MM-DD. No matter what I enter in the PHP form, however, all I get for the date is 0000-00-00. Can someone give me a clue as to what I'm doing wrong? (I'm not sure if this should be here or in the PHP forum, so let me know that too.)
Thanks!
 
This is likely a PHP issue in how you insert the value.

You'll need to show your PHP code,.

forum434


----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
You're right, it was a type in the PHP code. Long night, tired eyes. Sorry to bother.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top