saving current ip addresses in mysql table

The right way.

$ipaddress = $_SERVER['REMOTE_ADDR'];   
$sql = "INSERT INTO 
            ucm_signup 
            ( fname, lname, email, phone, iama, buyfrom, ipaddress )
        VALUES
            ( '$_POST[fname]', '$_POST[lname]', '$_POST[mail]', '$_POST[phone]',
              '$_POST[iama]', '$_POST[buyfrom]', '$ipaddress')";


Leave a Reply