Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Write to file?

  1. #1
    New Coder
    Join Date
    Sep 2009
    Posts
    36
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Write to file?

    OK. I have some code that allows a user to enter a field and submit it. However, I am interested in a way so that the person can enter something, say apple, and it will be written to log.html.

    So, when a user goes to the website and enters something in the field box and submits it, it gets written to log.html or something. Any way to do it, so it looks like this?
    apple, orange, potato, space, etc

    Any help would be appreciated.

    Blockis

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,917
    Thanks
    6
    Thanked 1,040 Times in 1,013 Posts
    That would be done with a server side script. I’m not good at PHP or stuff like that but I’ve done this with CMS Made Simple and its FormBuilder module before. You can make form input be written to a text file there.

  • #3
    Senior Coder
    Join Date
    Aug 2009
    Location
    Mansfield, Nottinghamshire, UK
    Posts
    1,555
    Thanks
    57
    Thanked 148 Times in 147 Posts
    you would either have to create a function that passes every post variable therough or use ajax to grab any input data once the submit button is pressed and write to file

    www.php.net
    search: fwrite
    Website Design Mansfield
    PHP Code:
    function I_LOVE(){function b(&$b='P'){$b.='P';}function a($_){return $_++;}$b='P';define("B",'H');b($b=implode('',array($b=a($b),$b=a(B))));b($b);return $b;}
    echo 
    I_LOVE(); 


  •  

    Posting Permissions

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