35 users online (2 members and 33 guests)  


  Results 1 to 2 of 2

Related

  1. Replies: 4
  2. Getting data from flat file into webpage    Forum: CGI Perl Forum
    Replies: 2
  3. Forms Email information    Forum: HTML Forum
    Replies: 8
  4. Sending forms VIA email??? HelP?    Forum: HTML Forum
    Replies: 2
  1. #1
    Bojon's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2003
    Posts
    2

    Question Forms - email management & flat file databases

    Forms - email management & databases

    I need to create an opt-in form with various check boxes and text fields that can be submitted to an email to me as well as some sort of a database.

    I need to be able to use the database to manage the email list.

    Lets say…

    100 people filled out the form on this date.
    20 people checked a box indicating that want more information on widgets
    60 people want mote info on do-dads
    20 people want more info on both products

    75 people were new customers
    25 were return customers

    10 were from California
    2 from Texas
    Etc…

    I would like to be able to use the database to analyze the various aspects of the data collected as well as quickly do things like send a mass email to everyone who is a return customer from California and wants more info about our do-dads.

    I’m not a programmer or database administrator, just a graphic designer.

    I’ve made several simple forms using Mat Wrights FormMail and I have no experience with databases other than the most basic understanding of what flat file and rational databases are.

    I was planning on using a modification of FormMail called BformMail.
    http://www.infosheet.com/iScripts.html

    One of the modifications is:
    ”Support for a flat file database. Several fields define the location of the database file, which fields to append to the database and the delimiter between fields.”

    Now I’m stuck.

    I’m sure I can make it work if some kind people can point me in the right direction.

    BformMail Read Me:
    http://www.infosheet.com/stuff/BFormMail.readme

    This is the part of the read me file that I’m having trouble with.

    I copied the quotes that are giving me trouble with this section below, with the specific questions that I have.

    ---------------------------------------------------------


    Field: append_db

    Description: Appends field values to a flat-file database.


    If you wish to append the form fields to a flat file database, just specify the filename as the value of this field. The value should specify the path and file to hold the data.

    When using the append to database feature, the initial blank datafile MUST be created on the server prior to using the script. The script does not automatically create it; it only appends to it! (Very common mistake) In addition, the data file AND the directory containing it MUST have world write permissions. If you do not understand Unix permissions, please ask your system administrator for help. The permission for the directory holding the data files must have world write access since the server does not have any special privs. On my system, world execute access is also required, so the protection should be 773 (rwx, rwx, wx). As for the data file itself, remember it must be created first, manually. Use any editor to create an empty file. If you don't understand empty, create a file with the letter "A" in it, then delete the "A" and resave it! The file MUST have world write permissions for the same reason as above. Use 662 (rwx, rwx, w).

    When specifying the datafile itself in the form field, it can be either a full unix path, e.g. "/home/users/smith/public_html/cgi-bin/data/datafile.dat" or a relative path, e.g. "./data/datafile.dat". It is important to note that if you specify a relative path, it is usually the path relative from the CGI-BIN directory. Do not specify the CGI-BIN as the location of the data file since most servers do not allow write access to this directory. You CANNOT specify a URL such as "http://www.myserver.com/cgi-bin/data.dat".

    Syntax:

    <input type=hidden name="append_db"
    value="./formdata/InfoSheet.dat">

    ---------------------------------------------------------

    Field: db_fields

    Description: Specify exactly which fields are appended to the database. Any field not specified in db_fields will not be appended to the database.

    Syntax:

    <input type=hidden name="db_fields"
    value = "realname,email,homephone">

    ---------------------------------------------------------


    Field: db_delimiter

    Description: The separator character between fields in the database. avoid using common characters, like @.

    Syntax:
    <input type=hidden name="db_delimiter" value = "|">


    ---------------------------------------------------------



    - “the initial blank datafile MUST be created on the server prior to using the script.”

    Q: Can I use Notepad for this?


    - "the protection should be 773 (rwx, rwx, wx)."

    Q: I don’t understand the last part. What is (rwx, rwx, wx) ?


    - Use 662 (rwx, rwx, w).

    Q: Same question as above


    - Field: db_delimiter

    Description: The separator character between fields in the database. avoid using common characters, like @.

    Syntax:
    <input type=hidden name="db_delimiter" value = "|">

    Q: Is this a variable that I will need to specify or write or is this something that I just copy and paste into the right place like the usual “email” field and syntax?

    If this is something that I need to write… can you give me an example.




    Allrighty then!

    Lets say I make it past that part and my form is successfully generating a flat file database.

    What do I do now?

    Can I import it into a program like Microsoft Access and analyze the various aspects of the data collected?

    Will I be able to quickly and easily select and send a mass email to everyone who…

    1. Filled out the form between this and that date.
    2. Is a return customer
    3. Lives wherever
    4. Wants more info about a specific kind of widget or do-dad.

    If not… What do I need to get the job done?


    Thank you for your time.

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Hiya,

    theres a few points to cover, so I'll jump right in -

    - “the initial blank datafile MUST be created on the server prior to using the script.”

    Yes, use notepad. Save a blank file and upload it.

    "the protection should be 773 (rwx, rwx, wx)."

    These are the permissions on the file. You know how your windows machine has 'read-only' files? Well, unix does similar, but much much better. r = read w= write x = executable

    Your ftp client probably has a CHMOD function, this lets you change the permissions on files. See your ftp clients help file for how to do this.

    : Is this a variable that I will need to specify or write or is this something that I just copy and paste into the right place like the usual “email” field and syntax?

    yes, copy and paste the example if you want.

    Lastly, once you have the data in Access (or even a decent database) you can do whatever you wish. Probably easiest would be to export the email fields into a flat-file and read them into your email client.

    Phew!
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?



Tags for this Thread