Results 1 to 4 of 4

 

Thread: Help with saving form fields to different CSV files.

  1. #1
    Registered User

    Status
    Offline
    Join Date
    Jul 2007
    Posts
    355
    Thanks
    13
    Thanked 14 Times in 8 Posts


    Hi Folks,

    I really need some help if possible.

    I am creating a form with multiple check boxes which is straight forward enough but im stuck on the coding side of things.

    I would like different CSV files that relate to each checkbox where if the check box is ticked the clients email address will automatically be stored in each corresponding file. (The clients email address could end up in more than one file)

    I believe i'll need a webhost with PHP enabled which isnt an issue and I think I need to upload the CSV files to the server but I am stuck on the coding to tie the files to the fields.

    I have tried using things like PHP form generator but I cant get it to do exactly what I want.

    Any help/advice would be greatly appreciated.

    Many thanks in advance.

    James

  2. #2
    scriptmonkey's Avatar
    Oranges & Lemons

    Status
    Offline
    Join Date
    Jan 2009
    Location
    Worthing
    Posts
    1,607
    Thanks
    112
    Thanked 253 Times in 192 Posts
    Hi James, I believe this will help you achieve what you want

    PHP form inserts data into CSV file
    The trouble with the rat race is that even if you win you're still a rat.
    Time passes. Listen. Time passes. Dylan Thomas
    Ebay Alerts to your inbox

  3. #3
    Registered User

    Status
    Offline
    Join Date
    Jul 2007
    Posts
    355
    Thanks
    13
    Thanked 14 Times in 8 Posts
    Thanks for taking the time to reply to my post.

    I have already read that article and it didnt help with what I wanted the form to do.

    I am designing a newsletter site and have a form with checkboxes.

    The issue I have is I would like seperate CSV files for each of the checkboxes.

    I would like the users name, email and contact number to be automatically inserted into the relevant CSV files for later download.

    I have looked at things like PHP Form Generator and searched high and low on search engines.

    I understand all info from a form can be downloaded to 1 CSV but I would like to know if what i'm trying to do is possible?

    Something like if option 1 is yes send name, number and email here, option 2 send there etc

    Many thanks in advance.

    James

  4. #4
    scriptmonkey's Avatar
    Oranges & Lemons

    Status
    Offline
    Join Date
    Jan 2009
    Location
    Worthing
    Posts
    1,607
    Thanks
    112
    Thanked 253 Times in 192 Posts
    James, all you need to do is use the code on that example, then run some php if loops based on the checkbox value, eg.

    if ($checkbox1value=='Yes')
    {
    code to write to csv1
    }

    if ($checkbox2value=='Yes')
    {
    code to write to csv2
    }

    ..............

    if ($checkbox10value=='Yes')
    {
    code to write to csv10
    }
    The trouble with the rat race is that even if you win you're still a rat.
    Time passes. Listen. Time passes. Dylan Thomas
    Ebay Alerts to your inbox



Thread Information

Users Browsing this Thread

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

Similar Threads

  1. IRS Form W-8BEN - Working with a US network and how to fill in this form
    By Fraser in forum Affiliate Marketing Lounge
    Replies: 5
    Last Post: 05-09-07, 01:40 PM
  2. Linkshare Sign Up Form LS Form W-8EXP
    By Qui Gon Jinn in forum Affiliate Marketing Lounge
    Replies: 2
    Last Post: 08-05-07, 07:11 PM
  3. Finance leads: own form vs merchants form
    By hiptophop in forum Affiliate Marketing Lounge
    Replies: 0
    Last Post: 29-09-05, 01:45 PM
  4. Finance leads: own form vs merchants form
    By hiptophop in forum Affiliate Marketing Lounge
    Replies: 0
    Last Post: 29-09-05, 01:44 PM
  5. saving excel data into "|" delimited txt files?
    By Matt Seigneur in forum Programming
    Replies: 7
    Last Post: 25-08-04, 10:00 PM

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
  •  
To Top

Content Relevant URLs by vBSEO 3.5.0 RC2