Hi, I tried to convert timestamp into the actual date and time.
<?php
$connectmysql = mysql_connect("localhost", "********_login", "********");
mysql_select_db("********_login", $connectmysql);
$timestamp = mysql_query("SELECT timestamp FROM blog_users
WHERE username = '<?php session->username ?>', $connectmysql);
$datetime = date("Y-m-d H:i:s", $timestamp);
?>
This gets the user's username:
$session->username
But, then I get an error:
Parse error: syntax error, unexpected 'Y' (T_STRING) in /home/promanx2/public_html/admin/admin/index.php on line 12
That's the
$datetime
line.
Please could someone help. I'm also a beginner at php, so please could you make your answers simpler and explain what it does, if you want.