Forum: PHP Jul 21st, 2009 |
| Replies: 20 Views: 1,237 Sorry for not getting back to you about my idea. What I meant was, you store the timestamp for each user's last activity in the database. Then any time you want to check if someone is "active" you... |
Forum: PHP Jul 19th, 2009 |
| Replies: 10 Views: 497 Holy Moley, you'll hate your self for this :P You forgot a crucial line: mysql_query($sql); which should go on line 16. As your code stands, it doesn't execute the new SQL command, just sets the $sql... |
Forum: PHP Jul 19th, 2009 |
| Replies: 20 Views: 1,237 The easiest way to do this would be to set a column "lastactivity" to the current time every time the user loads any of your pages (just build it into your authentication script). You can then... |
Forum: PHP Nov 2nd, 2008 |
| Replies: 13 Views: 2,058 This is a great method for the date. If you wanted to you could even return "$year - $month - $day"; if it is a valid date or FALSE if it isn't seeing as you already have the variables set.
As for... |
Forum: PHP Oct 29th, 2008 |
| Replies: 11 Views: 2,640 Check out this (http://www.tizag.com/phpT/files.php) and look into getting the entire file into a variable with "\n\r" (linefeed and carriage return) separating each line of text. Alternatively write... |
Forum: PHP Oct 28th, 2008 |
| Replies: 3 Views: 963 Why the $result = mysql_query($query); on the fourth last line? You don't need the $result = on that line as the mysql_query will return TRUE on success. You are then treating this as a MySQL result... |