Announcement

Collapse
No announcement yet.

txt files

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • txt files

    I want to create a page that has a text box, and an "Enter" button

    when the page loads, I want the contains of a.txt to be loaded into the textbox, and when they click enter, I want to save whats in the textbox to a.txt
    NXSupport Admin

  • #2
    touch("some.txt") should give you what you want.
    It will create what ever file you specify in the ().

    Comment


    • #3
      can you give me the whole code, because i just started learning php not too long ago
      NXSupport Admin

      Comment


      • #4
        I'm not php expert, but this might work...

        PHP Code:
        echo "<form action=data.php name=form method=post";
        echo 
        "<textarea rows=14 name=S1 cols=57>";
        include(
        "hello.txt");
        echo 
        "</textarea>";
        echo 
        "<input type=submit name=submit value=Enter>";
        echo 
        "</form>"

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X