Menu

What's the best way to receive form data?

Help
MRoss
2006-11-15
2013-06-03
  • MRoss

    MRoss - 2006-11-15

    Hi, I'm new to php/mysql.
    I need to set up a form (easy enough to do from what I've read in this forum). Understand you have the 3 options; 1) email info back to designated email address, 2) have the form generate a mysql database (through CPanel), 3) flat database.
    I'm just trying to clarify which is the best way to go before I start the work. If I choose option 1, is the form sent as a form, or is it sent in text format or a flat database (what does this mean?)

    The person receiving the info is not very computer literate so I have to make it as easy as possible for him!
    The end result being that whoever receives the data will have to create a database (most likely in Excel). 

    If, after say 12 months you want to email all these people, can you just upload the excel or text file somewhere(?) or would you have to create a mysql dbase in CPanel and add each email address?

    Help would be much appreciated.

    cheers
    Maddie

     
    • TNTEverett

      TNTEverett - 2006-11-15

      Flat just means that all data for a specific entry is stored in a single row. 
      The first line in the db file is always a templatefor the row entries.
      Ex:
      FirstName|LastName|Email
      John|Smith|joe@smith.com
      Red|Hood|red@ridinghood.com

      This type of file is easy to enter into Excel.  The file is only stored on the web site where the form resides so transfering it to someone would be a manual process.  Sending data in an email is simple but the format is somewhat different and not as simple to enter into Excel (each entry is done one at a time). 

      Emailing to your list is a different problem.  You must have some mailer program that will accept data in a particular format.  The data you collect will either have to be in that format or will have to be converted before it can be used. 

       
    • MRoss

      MRoss - 2006-11-15

      Thanks for coming back to me so quickly!
      A great help.
      Can you recommend a simple mailer program to work in conjunction with the form? 

       
      • TNTEverett

        TNTEverett - 2006-11-16

        Nothing will directly integrate with teh forms you create.  There will always be some level of work to get the mailing list into a usable format. 
        I do know of a mailer program you can use.  Send me an email and I will forward the link to you. 

         
    • MRoss

      MRoss - 2006-11-16

      TNTEverett, you've been really helpful.
      Hope someone can help me with this one too.

      When I first set up the form (traa1) I checked create database and table. 
      I've gone into MySql Account Maintenance and have the following message

      Connection Strings
      Perl $dbh = DBI->connect("DBI:mysql:xxxxxxx_traa1:localhost","xxxxxxx_frgn1","<PASSWORD HERE>");
      PHP $dbh=mysql_connect ("localhost", "xxxxxxx_frgn1", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
      mysql_select_db ("xxxxxxx_traa1"); 

      And then into PhyMyAdmin. CPanel uses version 2.9.02 of PhpMyAdmin. The video tutorial has a different view to what I get. So I didn't know how to get into the actual database.

      So I created a new 2 field test (test2) -

      Create data file (file based database): Y
      Insert data to MySQL database table? Y
      Gave my
      hostname:  localhost
      username:  etc
      password: 
      database: 

      checked
      Create new table? Y

      And then I get this message at the final stage:
      Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'xxxxxxx'@'server1dtnoc.com' 45.(using password: YES) in /home/xxxxxxx/public_html/formgen/process3.php on line 288
      Could not establish connection to MySQL database with the information provided.

      I don't know who 'server1dtnoc.com' is, and not sure what I've done wrong.

      How do you access the actual database so that it can be exported as an excel spreadsheet?

      Sorry, I'm on 'L' Plates (Learner's)

       
      • TNTEverett

        TNTEverett - 2006-11-16

        Using MySQL can be tricky sometimes because it depends on how MySQL is setup.  The first thing to check based on your error "Access denied" is whether or not the username is already setup in PhpMyAdmin.  If not, go ahead and create a username and password with full permissions.  Use this new username and password when you create a new test form, or edit the username and password already setup on an existing form. 
        Don't worry about the server name you get from the error message just yet.  It should just be reporting the server name that your web host is using (localhost). 

        Accessing the database so that it can be used in a spreadsheet is completely separate from the errors you are getting.  Ignore that until you get your form running properly. 

         
        • MRoss

          MRoss - 2006-11-17

          OK, will give it a try and report back.
          cheers

           

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.