Jump to content


Photo

sending ip & refer details to mysql?


  • Please log in to reply
3 replies to this topic

#1 david4ie

david4ie
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 30 September 2006 - 09:55 PM

Hi :)

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

thanks

edited by CV to remove an ad link.

#2 Gaoshan

Gaoshan
  • Members
  • PipPip
  • Member
  • 25 posts

Posted 30 September 2006 - 10:30 PM

mysql_query("INSERT INTO thetable (thecolumn) values ($_POST['foo'])");

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



#3 david4ie

david4ie
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 01 October 2006 - 06:55 AM

Thanks .. ill try it now:)

#4 JasonLewis

JasonLewis
  • Members
  • PipPipPip
  • Advanced Member
  • 3,351 posts
  • LocationVictoria, Australia

Posted 01 October 2006 - 09:34 AM

if you want the users ip u have to use:
$ip = $_SERVER['REMOTE_ADDR'];
i think thats there IP.

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

Good luck with your coding.
Jason / ProjectFear / Jaysonic




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users