Jump to content

Archived

This topic is now archived and is closed to further replies.

david4ie

sending ip & refer details to mysql?

Recommended Posts

Hi :)

Does any body no how to send logged user details to a mysql table?

thanks

[size=1pt][color=purple][i]edited by CV to remove an ad link. [/i][/color][/size]

Share this post


Link to post
Share on other sites
[code]mysql_query("INSERT INTO thetable (thecolumn) values ($_POST['foo'])");[/code]

Of course, this assumes you are getting the login data via $_POST.

Share this post


Link to post
Share on other sites
if you want the users ip u have to use:
[code]$ip = $_SERVER['REMOTE_ADDR'];[/code]
i think thats there IP.

if u want were they were refered from:
[code]$refer = $_SERVER['HTTP_REFERER'];[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.