how to record ip address on register? how to record ip address on register?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

how to record ip address on register?

Started by ian ditch, November 11, 2006, 02:01:04 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ian ditch

Is it possible to add the members ip address to the database when they subscribe?

I have added a cell in cm_users called 'ip_address' and i'm grabbing their  ip adress with
$ip_address = GetHostByName($REMOTE_ADDR); 

I just can seem to place the address into this database cell.

Any help would be appreciated.

Nibbler

Query is in register.php

   $sql = "INSERT INTO {$CONFIG['TABLE_USERS']} ".
           "(user_regdate, user_active, user_actkey, user_name, user_password, user_email, user_profile1, user_profile2, user_profile3, user_profile4, user_profile5, user_profile6) ".
           "VALUES (NOW(), '$active', '$act_key', '" . addslashes($user_name) . "', '" . addslashes($encpassword) . "', '" . addslashes($email) . "', '$profile1', '$profile2', '$profile3', '$profile4', '$profile5', '$profile6')";


Add in your new field there


   $sql = "INSERT INTO {$CONFIG['TABLE_USERS']} ".
           "(user_regdate, user_active, user_actkey, user_name, user_password, user_email, user_profile1, user_profile2, user_profile3, user_profile4, user_profile5, user_profile6, ip_address) ".
           "VALUES (NOW(), '$active', '$act_key', '" . addslashes($user_name) . "', '" . addslashes($encpassword) . "', '" . addslashes($email) . "', '$profile1', '$profile2', '$profile3', '$profile4', '$profile5', '$profile6', '$raw_ip')";