Srange error

From: Date: Thu, 20 Mar 2003 10:48:04 +0000
Subject: Srange error
Groups: php.general 
Request: Send a blank email to php-general+get-140413@lists.php.net to get a copy of this message
Hi, I would be very grateful if someone could explain to me why this is happening. I am trying to convert a date sent from a textfield. The textfield is initially populated by a JavaScript calendar control. Using the following code I am attempting to read in the date sent from the textfeild: //initialise dates for header of table if(isset($goto_date) == true){ //use dates sent from form $full_date = date("dS of F", strtotime($_POST[input1])); $day = date(d, strtotime($_POST[input1])); echo "full_date: $full_date<br>"; echo "day: $day<br>"; } else { //use todays date $full_date = date("dS of F"); $day = date(d); } but i keep getting this output: full_date: 24th of August day: 24 the javascript populates the textfield in the form off dd-mm-yyyy. Thanks in advance for any advice offered

« previous php.general (#140413) next »