Announcement

Collapse
No announcement yet.

Action: Multi URL

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Action: Multi URL

    Hi all,

    Is it possible to have a form with 2 inputs (<select>) to send the input variables to the appropriate PHP page without having to select a particular URL as the action..? or do we have to have a set PHP page to process the input variables and then direct the form to the appropriate page that contains the data..?

    Example:

    Variable1: John
    Variable2: Good
    In this case we need the following URL on the screen:
    http://examplepage.com/moods/when_john_is_good.php

    But, if the variables are:

    Variable1: Roberto
    Variable2: Bastard
    in this case we need this url on the screen:
    http://exampleplage.com/moods/when_r..._a_bastard.php

    So, is this possible?

    Anyhelp would be appreciated.

    Cheers.

  • #2
    Re: Action: Multi URL



    What you can easily do, is this: create one, single script, with two parts: using the "if... else" and a comparison between the select option and the pre-specified values you can have one or the other part of the script executed. So you get the correct results depending on the value of your select field
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

    Comment


    • #3
      Re: Action: Multi URL

      Thanks Naval.

      Looks like this is the simplest option. I've considered IFrame URLs and so on, but that was not going to be suitable because my pages will contain paid advertising so it is in my interest to have independent pages to maximize banner ad space.

      ... So I guess, the poor Form Host page is going to have to live with another script slugged in its head tag..:))

      Anyway.. Thanks again for your help.. "if, else" it is. Cheers mate.

      Comment


      • #4
        Re: Action: Multi URL

        Originally posted by ez-ez
        Thanks Naval.

        Looks like this is the simplest option. I've considered IFrame URLs and so on, but that was not going to be suitable because my pages will contain paid advertising so it is in my interest to have independent pages to maximize banner ad space.

        ... So I guess, the poor Form Host page is going to have to live with another script slugged in its head tag..:))

        Anyway.. Thanks again for your help.. "if, else" it is. Cheers mate.
        To be honest, i don't excactly understand what you mean or why the script should be in the head tag. However, if you want to be more specific, i'll try to help.
        Navaldesign
        Logger Lite: Low Cost, Customizable, multifeatured Login script
        Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
        DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
        Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

        Comment


        • #5
          Re: Action: Multi URL

          I thought the "if, else" script would have to go in the head of the page html.. and the actual form would go in the body. Would it still work if the entire script went into the form?

          Thanks mate.

          Comment


          • #6
            Re: Action: Multi URL

            Originally posted by ez-ez
            I thought the "if, else" script would have to go in the head of the page html.. and the actual form would go in the body. Would it still work if the entire script went into the form?

            Thanks mate.
            Nothing like that. The form is a page by itself, then the action is set to call the php script. This has to be an entirely separate page (invisible to the visitor). When the script finishes what it has to do, it redirects the visitor to whichever page you want.
            Navaldesign
            Logger Lite: Low Cost, Customizable, multifeatured Login script
            Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
            DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
            Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

            Comment


            • #7
              Re: Action: Multi URL

              Hi Naval,

              I think I get it now.. I have to remember that this is a form on a html page being processed in PHP.. Obviously PHP will not allow multiple action.

              Please confirm my understanding, we need to create the form and set the action to a php page, example:

              action: process.php

              then, we need to create the PHP page which carries the script, example:

              <?php
              if (($country=="Australia") || ($city=="melbourne"))
              {
              urls="australia_cities_map.php
              }
              and so on..

              am I correct?

              Thanks.

              Comment


              • #8
                Re: Action: Multi URL

                Originally posted by ez-ez
                Hi Naval,

                I think I get it now.. I have to remember that this is a form on a html page being processed in PHP.. Obviously PHP will not allow multiple action.

                Please confirm my understanding, we need to create the form and set the action to a php page, example:

                action: process.php

                then, we need to create the PHP page which carries the script, example:

                <?php
                if (($country=="Australia") || ($city=="melbourne"))
                {
                urls="australia_cities_map.php
                }
                and so on..

                am I correct?

                Thanks.
                Yes, this is the concept. of course you will need a start part in your script to get the variables value from the array submitted by the form
                Navaldesign
                Logger Lite: Low Cost, Customizable, multifeatured Login script
                Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                Comment

                Working...
                X