Results 1 to 10 of 10

Thread: can somebody help me out

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715

    can somebody help me out

    http://www.vbulletin.com/forum/showt...threadid=29241

    you can post the reply here if you want
    NXSupport - Your one-stop source for computer help

  2. #2
    Well, what language?

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    vBulletin Community Forum > General > PHP coding > txt files


    php
    NXSupport - Your one-stop source for computer help

  4. #4
    scoutt
    Guest
    PHP Code:
    <?
    // variables
    $filepath = "file.txt";

    echo "<html>
    <head>
    <title></title></head>
    <body>";
     if ($submit){
             $fileread = fopen("file.txt", "w");
             fwrite($fileread,$ID);
             fclose($fileread);
             echo "File Saved";


    }else {
    echo "<center><form action=\"$php_self\" method=\"POST\">";

       $filebody = implode("",file($filepath));
    echo "<textarea type=text name=\"ID\" size=50 rows=20 cols=50>$filebody</textarea>";
    echo "<input type=submit name=submit value=submit></form>";
    echo"</body></html>";
    }

    ?>

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    thanks, my only problem is that when it you enter a ' it saves it as a \'
    NXSupport - Your one-stop source for computer help

  6. #6
    scoutt
    Guest
    ok let me play around with it. I think you might need the magic_quotes in but not sure.

  7. #7
    scoutt
    Guest
    I can't get it to do that. I do know what you are talking about. are you on your server or an isp? if yours what is it, Apache?

  8. #8
    scoutt
    Guest
    forget that last post.. lol
    add this (bold)

    $fileread = fopen("file.txt", "w");
    $ID = stripslashes($ID);
    fwrite($fileread,$ID);

  9. #9

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    thanks
    NXSupport - Your one-stop source for computer help

  10. #10
    scoutt
    Guest
    hey dim, I was fooling around with it and came up with this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width