Jump to content

[SOLVED] Capturing the incoming url


jpfred

Recommended Posts

To clarify what I am trying to do,

 

When an individual executes to myfile.php by clicking on SUBMIT on myfile.html I would like to be able to capture their current ip address or complete url and write it to a database.  A conceptual example of what I would like can be seen below:

 

<?php

$myip=??????;

mysql_connect("myserver.myserver.com", "myuserid", "mypassword") or die(mysql_error());

mysql_select_db("mydatabase") or die(mysql_error());

$data = mysql_query("INSERT INTO mytable VALUES($myip)");

?>

 

Expected result would be:

 

$myip = 11.11.11.11

 

The part I am confused about is what would I need to fill in "??????"

Archived

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

×
×
  • Create New...

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.