Im trying to do an update like
UPDATE online_table SET time='$time' WHERE user='$user' AND ip_address='$ip'
But its updating all the "guests" users times, without bothering if they have a diferent IP address.. Whats the problem ?
check data type of your ip_address field in table and the data you are putting in $ip, there must be a difference in them.
The query looks fine to me.
The data type is a VARCHAR of size 16
hello check for few things: 1. are you changing the $ip values anywhere?
are you storing ip with dots like 192.168.1.10 ? if yes are the dots there while updating?
rare possibility, if all your users from a partcular place say, office are behind a proxy server then they all will have same ip(that of proxy)!! but not to say that all users are from same office!!
i cant see any other problem, also its difficult to say without seeing the code