HTML FORMS AND PHP

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

    HTML FORMS AND PHP

    I've been studying some tutorials but I can't seem to wrap my mind around
    this...

    When I implement a menu (in my case a drop down menu) how can I tell the
    Action to do one thing if one menu item is chosen and another if another
    item is chosen?

    If I can't do it from the menu itself how do I process it in the page I
    call?

    I'm trying to writhe an "if" statment like this:

    If ($TChoice = "Dothisselectio n")
    How do I call a diffrent page?;
    I've read through a few tutorials and I can't seem to figure out how to call
    a diffrent page! I'm new to HTML and PHP so I'm sure it's painfully obvious.
    Thanks for the help.

    Rob


  • Geoff Berrow

    #2
    Re: HTML FORMS AND PHP

    I noticed that Message-ID: <RfOdnbly3KgN9F 2iRVn-uA@comcast.com> from Rob
    contained the following:
    [color=blue]
    >I'm trying to writhe an "if" statment like this:
    >
    > If ($TChoice = "Dothisselectio n")
    > How do I call a diffrent page?;
    >I've read through a few tutorials and I can't seem to figure out how to call
    >a diffrent page! I'm new to HTML and PHP so I'm sure it's painfully obvious.
    >Thanks for the help.[/color]

    Check out include()

    --
    Geoff Berrow (put thecat out to email)
    It's only Usenet, no one dies.
    My opinions, not the committee's, mine.
    Simple RFDs http://www.ckdog.co.uk/rfdmaker/

    Comment

    • FLEB

      #3
      Re: HTML FORMS AND PHP

      Regarding this well-known quote, often attributed to Rob's famous "Sun, 23
      Nov 2003 01:02:28 -0700" speech:
      [color=blue]
      > I've been studying some tutorials but I can't seem to wrap my mind around
      > this...
      >
      > When I implement a menu (in my case a drop down menu) how can I tell the
      > Action to do one thing if one menu item is chosen and another if another
      > item is chosen?
      >
      > If I can't do it from the menu itself how do I process it in the page I
      > call?
      >
      > I'm trying to writhe an "if" statment like this:
      >
      > If ($TChoice = "Dothisselectio n")
      > How do I call a diffrent page?;
      > I've read through a few tutorials and I can't seem to figure out how to call
      > a diffrent page! I'm new to HTML and PHP so I'm sure it's painfully obvious.
      > Thanks for the help.
      >
      > Rob[/color]

      Instead of using an include(), I'd recommend using:

      header("Locatio n: $pagetogoto");

      in the script that gets called. You can't do this from the page with the
      menu, unless you use JavaScript fancies.

      --
      -- Rudy Fleminger
      -- sp@mmers.and.ev il.ones.will.bo w-down-to.us
      (put "Hey!" in the Subject line for priority processing!)
      -- http://www.pixelsaredead.com

      Comment

      Working...