i am using the following code to format a date.
the formatting works brilliantly. I don't need any help with date_format() or UNIX_TIMESTAMP
$rightdate='3';
$result = mysql_query("SELECT date_created FROM lesson_plans WHERE id= '$rightdate';",$bdsc) or die(mysql_error());
$row_result = mysql_fetch_assoc($result) or die(mysql_error());
$result2 = mysql_query("SELECT UNIX_TIMESTAMP(date_created) AS new_date FROM lesson_plans WHERE id= '$rightdate';",$bdsc) or die(mysql_error());
$row_result2 = mysql_fetch_assoc($result2) or die(mysql_error());
At the moment the variable $rightdate specifies the number 3, giving me the date for record 3 in any record viewed.
The records that are being viewed are selected using a url parameter called recordID.
my question is this, how can I define the $rightdate variable as the $HTTP_GET_VARS['recordID']
I have tried doing just that
$rightdate='$HTTP_GET_VARS['recordID']';
but no joy
I thought about trying to register the URL parameter as a session variable but got myself in a right pickle.
Any suggestions please