Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: CSV File Problem

  1. #1
    Join Date
    Sep 2004
    Posts
    7

    Default CSV File Problem

    I have the script working for my email. However I only want it to send form data to a csv file. I have the databse.csv file in the right folder and everythign is setup. I dont receive any errors however when i look in the database,csv file its empty ? I don't know what to do. Please advise. Thank you.

  2. #2
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: CSV File Problem

    Hi,

    Have you set DEF_ALERT?

    If so, you should be getting an alert message that tells you exactly what's wrong (assuming you've also specified in your form you want the CSV file to be written).

    If the above doesn't help, please email your form and formmail to supportstaff AT tectite DOT com.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  3. #3
    Join Date
    Sep 2004
    Posts
    7

    Default Re: CSV File Problem

    Yes i have set def_alert and it worked when i was first setting it up to send to email, which it did just fine. Then i went throught the how to guide for csv and initially i got alerts, but after i had worked on it i got no alerts and still nothing shows up in thte database.csv file.

    I sent and email with the two files attached.

  4. #4
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: CSV File Problem

    Hi,

    Got the files...

    It's worth making sure you can get alerts to work - it's the only way
    FormMail can communicate errors to you.
    Run FormMail like this:
    http://yoursite.com/formmail.php?testalert=1

    If you don't get an email message, try to find out why.

    This setting:
    $CSVDIR = "/csvdir/";

    looks wrong. The full pathname to the directory is almost certainly
    not this.

    However, FormMail should be sending you an alert saying that it can't
    open the "database.csv" file.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  5. #5
    Join Date
    Sep 2004
    Posts
    7

    Default Re: CSV File Problem

    I changed the dir path to the full path and I checked the test alert thing and I did receive an email back with the paths of the file, etc. So I changed the path to the full path and I went through the form again and submitted it. I received no email(which is a good thing) and I checked to find out that the database was still empty...?

  6. #6
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: CSV File Problem

    Hi,

    That's very strange. If FormMail cannot write to the file, you will get an alert message.

    Any possibility you're looking at the wrong file - that is, you have two "database.csv" files in two different directories?

    Please confirm these things:
    1. $CSVDIR in formmail.php is set to a full path to a directory
    2. "csvfile" in your HTML form is set to a single file name - namely "database.csv" (no path)
    3. the file "database.csv" is in the directory you've specified in $CSVDIR and the file is world-writable.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  7. #7
    Join Date
    Sep 2004
    Posts
    7

    Exclamation Re: CSV File Problem

    csvdir 777

    database.csv 777

    path to csvdir "/home/concept/wwwroot/conceptmarketinggroup.com/nhagala2005/csvdir"

    <input type="hidden" name="csvfile" value="database.csv" />

    i even have debug mode turned on so it show me the fields its writing when i submit.

    goto http://nhagala2005.conceptmarketingg...laregister.htm and hit submit.

    no errors and no email saying something is wrong.

  8. #8
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: CSV File Problem

    Hi,

    You've got:
    PHP Code:
    define("DB_SEE_INPUT",true);  // set to true to just see the input values 
    This means that FormMail shows you the input values and does nothing else.

    Set it back to false and test again.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  9. #9
    Join Date
    Sep 2004
    Posts
    7

    Default Re: CSV File Problem

    it did make a database and everyting was in there. It did not make the column names, or is it supposed to.

    ---------------------I got this---------------------------
    "fgdrfg","dthgdgh","","Brooklyn Campus","Corporate", <-Column Value
    --------------------------------------------------------

    --------------is it supposed to be like this-------------------------------
    "FirstName","LastName","","SchoolName","JobType", <-Column name
    "fgdrfg","dthgdgh","","Brooklyn Campus","Corporate", <-Column Value
    -----------------------------------------------------------------

    From my understanding the first time it adds the column headers. maybe i'm wrong. i'll try it again starting with a new database file.

  10. #10
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: CSV File Problem

    Hi,

    Yes, FormMail will automatically add the column names.

    But it only does this if the file is empty. It must be zero length.

    If there's even one character in the file, FormMail will not at the column names.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Problem with file Attachments
    By lemonade in forum FormMail Subscription Support
    Replies: 3
    Last Post: 16-Aug-2005, 08:24 PM
  2. Attaching CSV file
    By eu4ic in forum FormMail Subscription Support
    Replies: 6
    Last Post: 01-Jun-2005, 10:58 PM
  3. csv file problems
    By Badnet in forum FormMail Subscription Support
    Replies: 2
    Last Post: 12-Nov-2004, 02:06 AM
  4. Save to CSV file not working, Directory path
    By mkw in forum FormMail Subscription Support
    Replies: 3
    Last Post: 01-Oct-2004, 11:28 PM
  5. Downloading CSV file in Access
    By jgold723 in forum FormMail Subscription Support
    Replies: 2
    Last Post: 30-Aug-2004, 10:35 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
  •