hi i have the following error in my sent message file
Warning: date_diff() expects at least 2 parameters, 1 given in /home/letsswin/public_html/sent_mail.php on line 146
Show
Heres code section for error
<?php
$lastlog = mysql_fetch_array(mysql_query(" select * from user_lastlogin where online_status = '1' and user_id = '".$user_id."' "));
$start_date = $lastlog['lastlogin'];
$online_status = $lastlog['online_status'];
?>
<?php if($online_status == '1') { echo date_diff($start_date); } ?>
I have previously add a similar error to this on a differrent file and tried adding that solution and it didnt work which was
$then = new DateTime($lastlogin['lastlogin']);
$now = new DateTime("now");
echo $then->diff($now)->format('%a days');
any ideas please would be much appreicated