srose
-
Posts
8 -
Joined
-
Last visited
Never
Posts posted by srose
-
-
yes, that's it.
Thank you for all your help.
-
Hi
Thanks, that's it working now. Do you know how to insert a space?
-
Hi
Just tried that but now nothing gets written to the txt file. Any ideas?
-
<?php $num = 1; $myFile = "addresses.txt"; $fh = fopen($myFile, 'a') or die("can't open file"); fwrite($fh, $num)\n; fwrite($fh, $Address)\n; fclose($fh); $num = $num + 1; ?>
For some reason the backslashes are not displaying but they are there.
-
I tried that but every time I loaded the site it would just display a white screen. How exactly should I type it?
-
Hi
I have this code:
<?php $myFile = "addresses.txt"; $fh = fopen($myFile, 'a') or die("can't open file"); fwrite($fh, $Address); fclose($fh); $num = $num + 1; ?>
$Address will store IP addresses. How can I get each new IP to go in it's own line? Is there a way of having a number go before it aswell like this:
1. xxx.xxx.xxx.xxx
2 xxx.xxx.xxx.xxx
-
Hi
I am wanting to display users IP address on my site. I typed this into a paragraph:
<p> <?php $user_ip = $SERVER['REMOTE_ADDR']; print "Your I P Address is " . $user_ip; ?> </p>
All this does is print "Your I P Address is", but it does not say the IP.
What is wrong here.
Thanks
script to save whats entered in text box?
in PHP Coding Help
Posted
Hi
I want a PHP script that creates a text file and stores anything that is entered into a textbox when it is submitted.
Can anyone help me with this?