Open a page with php

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rick

    Open a page with php

    I need to be able to open different pages depending upon which botton was
    selected on a form. I can't find how to do this any help would be great.

    Thanks


  • Andy Hassall

    #2
    Re: Open a page with php

    On Sat, 8 Nov 2003 14:27:21 -0700, "Rick" <vfrrick@cox.ne t> wrote:
    [color=blue]
    >I need to be able to open different pages depending upon which botton was
    >selected on a form. I can't find how to do this any help would be great.[/color]

    A form only has a single action attribute. So you can't do this without
    multiple forms, or an intermediate page doing a redirect.

    --
    Andy Hassall (andy@andyh.co. uk) icq(5747695) (http://www.andyh.co.uk)
    Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)

    Comment

    • Marouen

      #3
      Re: Open a page with php


      "Rick" <vfrrick@cox.ne t> a écrit dans le message news: Gddrb.7101$Zb7. 3098@fed1read01 ...[color=blue]
      > I need to be able to open different pages depending upon which botton was
      > selected on a form. I can't find how to do this any help would be great.
      >
      > Thanks
      > [/color]

      Use switch function

      switch($page) {

      case "membres":
      include("membre s.html");
      break;

      case "register":
      include("regist er.html");
      break;

      case "contact":
      include("contac t.html");
      break;

      default:
      include("main.h tml");
      break;
      }

      Marouen

      Comment

      • Rick

        #4
        Re: Open a page with php

        I can't believe it was that easy thank again.


        "Rick" <vfrrick@cox.ne t> wrote in message
        news:Gddrb.7101 $Zb7.3098@fed1r ead01...[color=blue]
        > I need to be able to open different pages depending upon which botton was
        > selected on a form. I can't find how to do this any help would be great.
        >
        > Thanks
        >
        >[/color]


        Comment

        Working...