rodangib Posted May 6, 2008 Share Posted May 6, 2008 Hello Guys, On my php form I only got 3 fields to fill in (name, email, message) and in my db I've got ID, name, email, message and DateStamp, the latter in which I'd like to show the date and time (most importantly the date) when the form (therefore the data) was submitted... Using phpMyAdmin, is there a way to do this?? I have also included in my php file $date = date(d-m-yy); but is not registering any date... though the data is submitted successfully and stored in the db... Any thoughts please... truly appreciative... Rod Quote Link to comment Share on other sites More sharing options...
fenway Posted May 6, 2008 Share Posted May 6, 2008 How are you storing the date? What column type? Quote Link to comment Share on other sites More sharing options...
rodangib Posted May 6, 2008 Author Share Posted May 6, 2008 Hi there, It's stored as DATETIME dat type... Initially I set it as DATE and it didn't work either.... Cheers Quote Link to comment Share on other sites More sharing options...
rodangib Posted May 6, 2008 Author Share Posted May 6, 2008 I forgot to say that Im using the wamp2.0 combo.... if it makes any differrence... Quote Link to comment Share on other sites More sharing options...
AndyB Posted May 6, 2008 Share Posted May 6, 2008 date(d minus m minus yy) isn't going to give any rational output would be my guess. date("d-m-y") or date("d-m-Y") would work nicely Quote Link to comment Share on other sites More sharing options...
rodangib Posted May 7, 2008 Author Share Posted May 7, 2008 Andy, thanks...I did that on my php page... however, when I opened phpMyAdmin to check the record, the DateStamp field was filled in just as the other ones (00-00-0000) - All the other fields were filled in correctly, but the date one wasnt... Does it have to do with the php coding or with the database??? Regards. PS: I went to your website and read through the tuts... they're awesome.. gonna apply some of that to my apps... Quote Link to comment Share on other sites More sharing options...
fenway Posted May 7, 2008 Share Posted May 7, 2008 That's not a valid date format... you need YYYY-MM-DD. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.