php mysql REMOTE_ADDR not working

Joined
12 Feb 2006
Posts
17,676
Location
Surrey
i'm trying to store the visitors ip address in a mysql table but it's not coming out correclt some reason. this is roughyl what i have...

$ip = $_SERVER['REMOTE_ADDR'];

ip is a varchar in the table.

what i end up with everytime is ::1

am i doing something wrong? my error404 checking emails me the ip address of the user and that is correct so unsure what's making this incorrect.
 
Back
Top Bottom