Inserting the clients IP into a table
| From: | Mattias Johansson | Date: | Wed, 27 Dec 2000 00:00:45 +0000 |
| Subject: | Inserting the clients IP into a table | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-5439@lists.php.net to get a copy of this message | ||
Dear group - fast question from a newbie:
How do I insert the IP of the client into a MySQL database? This is going to
be used for a do-not-vote-twice mechanism) The IP shall overwrite the cell
if there is any info... I try to use this code, but it does not seem to
work:
$ipaddy=getenv(REMOTE_ADDR);
mysql_query("UPDATE phpDownloads SET iphit = $ipaddy WHERE DownloadID =
$did");
Please help - I'm very stuck.
/Mattias