From: "Radwan Aladdin" <[EMAIL PROTECTED]> > I made that.. but there is something strange!!
It's strange you can't follow instructions... > I SELECTED field from the database.. but it is not showing what it contains!! > > This is what is shown on the screen : > > UPDATE accounts SET LogoutTime=1075313199SELECT LoginTime,Distance,LessonNumber FROM accounts WHERE UserName='' AND Password=''UPDATE accounts SET LessonNumber=LessonNumber + 1 > Query error: You have an error in your SQL syntax near '0') WHERE UserName= AND Password=)' at line 1 If you had printed out all the queries, you'd realize that error is coming from $query4. > > > > $query4 = "UPDATE accounts SET (Distance='" . $LogoutTime - > > > > $RightLoginTime . "') WHERE UserName=" . $UserName . " AND Password=" > > > >. $Password . ")"; $UserName and $Password have no value. Your "distance" calculation doesn't make any sense, either, as you're subtracting a string from an integer... > > > $LogoutTime = date("U"); > > > $RightLoginTime = 'LoginTime'; So you're setting distance equal to 1034566 - "LoginTime" (for example), which is just going to come out to $LogoutTime (since a string converted to an integer is zero in this case). ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php