lastlog update

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mbshaf4
Forum Newbie
Posts: 11
Joined: Wed Apr 05, 2006 1:01 pm

lastlog update

Post by mbshaf4 »

I am trying to write a script that will update a users databse with the last date they logged in. This is the query i tried

$query = "UPDATE user SET lastlog=CURDATE() WHERE email='$e' AND password=SHA('$p')";

Is there anything that you guys see wrong with it.

Can you suggest how to do it?

Thanks in Advance
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

have you tried seeing what mysql_error() says?
Post Reply