i want to do a audit trail, and save the IP address users into my database … is there any php functions or statements that allow me to get users IP address?
@Paul_JrMay 13.2004 — #You can access it through the [font=courier]REMOTE_ADDR[/font] property of the $_SERVER (or $HTTP_SERVER_VARS) superglobal.
If you are using PHP version 4.1.0 or above, you access it like this: [code=php] <?php echo $_SERVER["REMOTE_ADDR"]; ?> [/code] But if you are using a version of PHP below 4.1.0, then you access it like this: [code=php] <?php echo $HTTP_SERVER_VARS["REMOTE_ADDR"]; ?> [/code] You can find some more info [url=http://www.php.net/manual/en/reserved.variables.php#reserved.variables.server]here[/url].