ok i was working on the referal for my site, and the first time it wouldnt add the information into the database, then when i got it to work it wouldnt add the ips properly, any idea why?
first code
$db->query("INSERT INTO referals VALUES('', {$_POST['ref']}, $i, unix_timestamp(),'{$r['lastip']}','$IP')");
new code
$refer= sprintf("INSERT INTO referals VALUES ('', %u, %u, %u, %u, %u)", $_POST['ref'], $i, $time, $r['lastip'], $IP);
$db->query($refer);
the second code inputs the info into the database
but for some reason when it inputs the info the ip is wrong
e.g. users ip is 99.88.77.66
it saves it as only 99 not the rest
any ideas?
thanks :mrgreen: