Save Form Data into a text file

Code with C | Programming: Projects & Source Codes Forums Miscellaneous Save Form Data into a text file

This topic contains 3 replies, has 1 voice, and was last updated by  Adan 2 years, 5 months ago.

  • Author
    Posts
  • #11035

    I am trying to use a form in my site and save the data you write there into a text file but I don’t know how to do that. I have searched all the forums but I can’t get it right.

    I have the code in my HTML for the form but I don’t know how to command it to save the data.
    I have the code from a forum, it looks good on my page but when I hit send it doesn’t do anything.
    I’ve heard it can be done using PHP or Javascript but I’ve never worked with those.

  • #11036

    Adelaid
    Member

    you need to set it up to email the info to you

    does your web host support “CGI”

    http://www.html-form-guide.com/form-mail/cgi-form-mail.html

  • #11037

    SapnaVishwas
    Member

    thanks but I can’t modify the code I wrote above. I need to know what else should I put in there to work.

    also, I need to submit the data to a text file not to email it.
    but thanks for your help, I appreciate it.

  • #11038

    Adan
    Member

    It is definitely possible to have the data from the text fields written plainly to some kind of text file as opposed to there being some kind of requirement to have them emailed to you…

    What you’re asking for would require some programming or at least a basic understanding of PHP, however. Even if someone here was to specifically *write the code* that does this for you, and gave it to you, you’d still need to have some kind of online website to run it on, or at least your own private server to run the PHP component for you.

    It’s difficult to tell what level you’re at but the general gist is that the information from the form you’ve posted will be sent to your web server where a PHP script will process it. You will code that PHP script to put that data *wherever you want* be that in an email, a text file, a database, whatever.

You must be logged in to reply to this topic.