Menu

2 forms, how to differentiate?

Help
Ashley
2009-05-26
2013-06-03
  • Ashley

    Ashley - 2009-05-26

    I am planning on using 2 forms that are similar, but serve different purposes. I only have one test form up right now just to make sure I know what I am doing--just a simple name field that e-mails to me on submit. I noticed that when I receive the e-mail, the subject is "phpFormGenerator - Form submission"

    If I have more than one form, can I somehow alter what the subject line is so I know which form submission it is that I'm looking at?

    Thanks, I am very new to this and would appreciate help!

     
    • Ashley

      Ashley - 2009-05-26

      Hm, after looking closely, I think I can change it in the processor.php script?

       
    • DMF

      DMF - 2009-05-28

      I have the same exact question and I am not a programmer.  Where would I locate the processor.pho script?  Thanks a million for any help!

       
    • DMF

      DMF - 2009-05-28

      Well I found that script in my website under the forms directoy, but now I have a question: 

      Can I just rename that scripte for each form, and thus create a unique one for each form. 

      The form code says: <form enctype='multipart/form-data' action='process.php' method='post'>

      So it would appear that the form and code are generated using generic names, but then you can just name them what you want, associating the script with the form after modifying the subject line, etc. to fit the form.

      Is that correct?

       
      • TNTEverett

        TNTEverett - 2009-05-29

        I'm not entirely sure I know what you are asking but I do know that the form1.html and the process.php files are paired together.
        If you want more forms to reside in the same folder then you must manage the file names.
        Form1.html can have any name you wish.  Likewise the process.php file can have any name you want but it must have the php file extension.  If you change the process.php for a specific form then you must change the name in the assiciated form file <form> tag. 
        Last, you must also manage how the process.php file uses it's database if it has one.  This is a bit more involved so I don't want to confuse anyone trying to explain it here. 

         
    • DMF

      DMF - 2009-05-28

      Actually, I am beginning to think that is actually necessary if you create multiple forms.  It's probably just overwriting the form and the process.php with each one.  I would imaging they need to be in the same directory as each other, or else the path supplied for the script?  As I said, I am not at all a programmer, I am just trying to figure this out.  Anyone who could enlighten me?  Thanks!

       
    • DMF

      DMF - 2009-05-28

      I just confirmed with my hosting company that that's how it's done!  Good luck!

       
    • TNTEverett

      TNTEverett - 2009-05-29

      vertigale

      Try adding a hidden field that is different in each form then sending the hidden field to yourself in the email. 

       

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.