Hi!
I want my members to see when their referral was logged in last. Right now it just shows 0000-00-00 I 've logged in and out but notjing seems to change, what is the problem? Why aren't php writing in my mysql database?
Thanks guys!
Date
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Date
The login is just a select. You need to update the field with something like:
UPDATE mytable SET mydate=NOW() WHERE id='$id'
UPDATE mytable SET mydate=NOW() WHERE id='$id'
(#10850)
Re: Date
It posted before a login date, but it just looked like this: 665258945 Just some numbers, and now I want them to look like 2008-08-30
Login.php
I tried your code but I just get a white page with T_string problem 
Login.php
Code: Select all
$lastlogdate=time();- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Date
You need to read up on the functions, but in the PHP and MySQL manual, that return timestamps and that return date strings.
(#10850)