Jump to content

srose

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Everything posted by srose

  1. 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?
  2. yes, that's it. Thank you for all your help.
  3. Hi Thanks, that's it working now. Do you know how to insert a space?
  4. Hi Just tried that but now nothing gets written to the txt file. Any ideas?
  5. <?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.
  6. I tried that but every time I loaded the site it would just display a white screen. How exactly should I type it?
  7. 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
  8. 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
×
×
  • 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.