The majority of forums are now only available as archives, which means posting/editing is disabled.
The Anything and Everything forum is still open.
The Anything and Everything forum is still open.
Update MySQL
|
|||
|
Rank: ? (10)
Member #: 27981 |
I try to update my users last login date,
but im not able? Anybody know why? I run this: Code:
ofcourse isnt this the whole script, the rest works, but this one dont ;( » Post edited 2006-10-23, 09:59pm by nukleuz.
---- Nukleuz ----
Newbie ;) thihi
|
||
|
|||
|
|||
|
Rank: ? (768)
Member #: 11085 |
I can't see any errors with your script at first glance, though that may simply be because I just awoke. Nonetheless, I must ask if that particular script generates any errors (and before you answer, be sure that errors are turned on in php.ini).
I can, however, see multiple problems with your script. First of all, you are much better off storing the result of the time() function in the database and calling the date(string format [, int timestamp]) function using it later. This allows you to eventually give users the option to set their own format for the date function, as well as their own offset to the time (offset from GMT where they live). Furthermore, if users have passwords, it would be wise to check them as well as the username whenever running any Mysql query which modifies the user table. This may come as a surprise to you, but it is unspeakably easy to modify $_GET variables, simple to modify $_COOKIE variable, and not too hard to modify $_POST variables on the users end, therefore, your current system allows any user to act as any user if so they wish. » Post edited 2006-10-24, 04:13am by relpats_eht.
- relpats_eht
|
||
|
|||
|
|||
|
Rank: ? (4827)
Member #: 3416 |
you are much better off storing the result of the time() function in the database and calling the string date(string format [, int timestamp]) function using it later
i strongly agree with this statement.
my mind is like a steel trap! it only hangs on to the big stuff. visit my forums at track7.org
|
||
|
Please login or register to post a reply.
