The same form in different pages

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Julia
    Special Status

    • Nov 2005
    • 177

    The same form in different pages

    Hi everybody there: trying to set up the same basic form in diffrent pages for my website, but i "guess" i need to change the names of pages, my question is

    If i have a form let's say with 3 pages that are already working OK in my site

    1. contact
    2. error
    3. thank_you

    Do i have to create a new form and again new 3 pages to set up the same form to get it work and just remane the pages in the .PHP file to


    1. contact1
    2. error1
    3. thank_ you1

    etc, etc, is this the right way to do when using the same form in multiple pages on your site?

    I hope a colonel inlight me with this tophic..i am at a loss
    but all suggestions are welcome...

    something that i was wondering is if is possible to use the same error, tank you pages of your form, to redirect all your contact forms to them but once again the experts will have the last word.

    Thanks in advance
  • Andy128
    Major General

    • Dec 2005
    • 2317

    #2
    Re: The same form in different pages

    Julia-
    The form pages themselves will be differnt names- formpg1, formpg2 etc...

    So long as the forms for each page are identical- (i.e.- the number of fields and the field names are the same) then the php processing page can be the same. For each form the action would be something like-
    thankyou.php

    And you can access the same error page for any form. Lets say that you have 4 forms that have an e-mail field. You can reference the same e-mail error page for all 4.

    If you read this tutorial- you can eaisly create one BV page that will display all your error messages- as many as you like.
    php mailto security tutorial

    This also incorporates form security.

    Hope that helps.

    Andy
    PHP- is a blast!

    Comment

    • Julia
      Special Status

      • Nov 2005
      • 177

      #3
      Re: The same form in different pages

      PHP Code:
       The form pages themselves will be differnt namesformpg1formpg2 etc... 
      Tkank you andy, i thought that the form pages themselves where referred in the .php file by name, and if making a new form for other website page with different names requires a second .php file to be uploaded, are you saying that all forms in my site can work wih one .php file?

      I do not know if i get it right?

      Comment

      • Andy128
        Major General

        • Dec 2005
        • 2317

        #4
        Re: The same form in different pages

        Well- actually the php file is refered to in the form- action= "thankyou.php"

        The php script named thankyou.php will then execute when called upon (by action of the form). Therefore- yes. If the forms are identical, the same php script (page) can execute for different forms on a server (website). If you look on the php script, you will not find a reference to the form page.

        In actuallity- that concept is how a hacker can use ones form against you. Lets say you set field length limits on your form. Because the form is html, it is visable to all via the source code. A hacker could duplicate your form-removing the field length limit and then set the action to:
        http://www.yourdomain.com/thankyou.php and then send out alot of
        spam which would appear to come from your form. **That is why the need to have a php script that sets length limits as php is not visable to anyone. So you see- the form can be different- but the php will execute if the fields are identical.

        Hope that helps.

        Andy
        PHP- is a blast!

        Comment

        • Julia
          Special Status

          • Nov 2005
          • 177

          #5
          Re: The same form in different pages

          Thanks Andy i will give it a try. and see what happen

          Julia.

          Comment

          • brsn
            Corporal

            • Nov 2007
            • 10

            #6
            Re: The same form in different pages

            I can not download form part 1 tutorial multimedia last 2 days, something wrong. My problem is reset and submit buttons are not functionate.
            www.mongolhiking.org
            www.test4life.org

            Comment

            • Andy128
              Major General

              • Dec 2005
              • 2317

              #7
              Re: The same form in different pages

              brsn-
              Please post your url to your form so we can check it.

              Andy
              PHP- is a blast!

              Comment

              Working...
              X