What type of field is 'ip'?
Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs
-Original Message-
From: Leif K-Brooks [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 9:18 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Trying to put ips into database
I'm
And for efficiency you could convert and store IP addresses in numeric
format.
See INET_NTOA and INET_ATON.
Subject:
Re: [PHP] Trying to put ips into database
From:
Matt Drake <[EMAIL PROTECTED]>
Date:
Fri, 8 Feb 2002 11:52:26 -0600 (CST)
To:
<[EMAIL PROTECTED]>
On Fri
nt...it should be at least 15 chars.
Matt
>
> /dkm
>
>
> - Original Message -
> From: "Leif K-Brooks" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, February 08, 2002 11:18 AM
> Subject: [PHP] Trying to put ips into
uot;Leif K-Brooks" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 08, 2002 11:18 AM
Subject: [PHP] Trying to put ips into database
> I'm trying:
> $query = mysql_query("select COUNT(*) as rowexists from ips where ip =
> '$REMOTE_A
I'm trying:
$query = mysql_query("select COUNT(*) as rowexists from ips where ip =
'$REMOTE_ADDR'");
$result = mysql_fetch_array($query);
if($result['rowexists'] == false){
mysql_query("INSERT INTO `ips` (`ip`) VALUES ('$REMOTE_ADDR')");
}
But it keeps putting the ip into tthe array, even if it'
5 matches
Mail list logo