tempguy Posted November 6, 2010 Share Posted November 6, 2010 I just created a form in php and put a date func. but the users enter information and send it to the page, its only showing the current date even if the user wrote it yesterday.. how do i correct it? echo "<font size='2' color='#737CA1'> *Submitted on "; echo date("m/d/Y"); Link to comment https://forums.phpfreaks.com/topic/217954-about-the-date/ Share on other sites More sharing options...
radar Posted November 6, 2010 Share Posted November 6, 2010 You want to store the date in the same location you're storing the data. I personally use the now() function to save my datetime information. Then you can output that by doing: $date = mysql_result(mysql_query("SELECT date FROM table WHERE something = something"), 0); echo date("m/d/Y", $date); Link to comment https://forums.phpfreaks.com/topic/217954-about-the-date/#findComment-1131135 Share on other sites More sharing options...
tempguy Posted November 7, 2010 Author Share Posted November 7, 2010 thanks for the reply radar but can you be little more specific on this line.. i dont get it ("SELECT date FROM table WHERE something = something"), 0); Link to comment https://forums.phpfreaks.com/topic/217954-about-the-date/#findComment-1131214 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.