NEED HELP ASAP
Posted: Thu Nov 24, 2005 2:27 am
Hello,
I need help getting an IP Address.
I have a HTML form and I would like the person who is visiting the page's IP Address in a text area. I cannot get the PHP to work though, I put the tags and closed them. This is my script.
Any help would be great. Thanks!
I need help getting an IP Address.
I have a HTML form and I would like the person who is visiting the page's IP Address in a text area. I cannot get the PHP to work though, I put the tags and closed them. This is my script.
Code: Select all
<FORM METHOD="POST" ACTION="feedback.php3">
Name: <INPUT TYPE="text" NAME="name" SIZE="30"><br>
Comments: <TEXTAREA NAME="comments" ROWS=6 COLS=30>
</TEXTAREA><br>
IP: <textarea name="ip" rows="1" cols="20" readonly>
<?
$ip = $_SERVER['REMOTE_ADDR'];
?>
</textarea>
<br>
<INPUT TYPE="submit">
<INPUT TYPE="reset">
</form>