Results 1 to 3 of 3

Thread: Saving form results as html on server as well as sending the results?

  1. #1
    Join Date
    Dec 2006
    Posts
    6

    Default Saving form results as html on server as well as sending the results?

    I want to save a copy of the results as a csv format and html format as well as send a copy of the csv and html formats to an email.

    When saving on the server, I want it to save in certain folders based on data recieved from the form.

    So if the form had a list to pick from january or february, that decision would affect where it would be saved.

    Is this possible with this script? Please respond fast. Thanks.

  2. #2
    Join Date
    Dec 2005
    Posts
    74

    Default Re: Saving form results as html on server as well as sending the results?

    send a copy of the csv and html formats to an email
    Formmail does this. It can even send to an email determined by a selection in the form.

    save a copy of the results as a csv format and html format
    Formmail can append the csv string to a file at the server. For security reasons it cannot create a new file so there will be no individual result files in either csv or html format.

    save in certain folders
    Forrmail cannot do this - the directory for the csv file is specified in the script itself.

    You can, however, accomplish the same result with a bit of coding effort.

    Hope this answers your question. Good luck.

    George

  3. #3
    Join Date
    Dec 2006
    Posts
    6

    Default Re: Saving form results as html on server as well as sending the results?

    Yeah, it answers my question.
    Been doing a little snooping around and came upon a page that talks about php and writing a file to server as shown here:

    Code:
    <?
    $body_content="This is my content"; // Store some text to enter inside the file
    $file_name="test_file.txt";               // file name
    $fp = fopen ($file_name, "w");  
    // Open the file in write mode, if file does not exist then it will be created.
    fwrite ($fp,$body_content);          // entering data to the file
    fclose ($fp);                                // closing the file pointer
    chmod($file_name,0777);           // changing the file permission.
    ?>
    So I ended up turning it into this
    Code:
    <?php
    //$dir=opendir("/home/nerveban/public_html/test/subchapter/$sub_chapters/$year/$month/");
    $body_content="<html></html>"; // Store some text to enter inside the file
    $file_name="portfolio.html";               // file name
    $fp = fopen ($file_name, "w");  
    // Open the file in write mode, if file does not exist then it will be created.
    fwrite ($fp,$body_content);          // entering data to the file
    fclose ($fp);                                // closing the file pointer
    //chmod($file_name,0777);           // changing the file permission.
    //closedir($dir);
    ?>
    The variables are parsed nicely thanks to formail. However, the <html> stuff in the body content area produces Parse error: syntax error, unexpected T_STRING in /home/nerveban/public_html/test/formprocess.php on line 6. I understand absolutley no php so I really would like some help with this. If someone could teach me information on how to do this then be my guest.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Sample HTML Form Using FormMail
    By russellr in forum FormMail
    Replies: 1
    Last Post: 21-Mar-2007, 06:49 AM
  2. Sending form results in an HTML email
    By russellr in forum HOWTO Guides and Tips
    Replies: 26
    Last Post: 12-Jan-2006, 08:31 PM
  3. Problem with new server sending mail
    By mstookey in forum FormMail Subscription Support
    Replies: 7
    Last Post: 25-Jun-2004, 01:27 AM
  4. Submitted form output onto HTML page?
    By LKimber in forum FormMail Subscription Support
    Replies: 2
    Last Post: 13-Apr-2004, 10:39 AM
  5. not so intersting results
    By expisp in forum FormMail Subscription Support
    Replies: 4
    Last Post: 10-Feb-2004, 07:15 AM

Bookmarks

Posting Permissions

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