Anchor Tag Help w/PHP

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

    Anchor Tag Help w/PHP

    I'm using PHP and while this is an HTML question, I'm looking for a
    PHP answer please - I've got several anchors similar to the one shown
    below - I'm calling a dispatcher.php script and I need to be able to
    determine which anchor was clicked on even tho they will all call the
    same dispatcher.php script - in PHP can I detect which anchor was
    clicked on once I'm in the dispatcher script?

    <A HREF="dispatche r.php">2</A>

  • akr

    #2
    Re: Anchor Tag Help w/PHP

    On Wed, 03 Sep 2003 05:11:03 +0000, Ralph Freshour wrote:
    [color=blue]
    > I'm using PHP and while this is an HTML question, I'm looking for a
    > PHP answer please - I've got several anchors similar to the one shown
    > below - I'm calling a dispatcher.php script and I need to be able to
    > determine which anchor was clicked on even tho they will all call the
    > same dispatcher.php script - in PHP can I detect which anchor was
    > clicked on once I'm in the dispatcher script?
    >
    > <A HREF="dispatche r.php">2</A>[/color]

    Hi

    Could you allot an id to each HREF tag and try to provide that as an
    argument to the script.

    regards
    akr

    Comment

    • Ralph Freshour

      #3
      Re: Anchor Tag Help w/PHP

      How do you assign an ID tag? I've tried:

      <A HREF="dispatche r.php" ID="num_2">2</A>

      But that doesn't seem to trap it in the dispatcher code where I have:

      if ($num_2)
      {
      etc.
      }


      On Wed, 03 Sep 2003 13:20:53 +0500, akr <therm@hotpop.c om> wrote:
      [color=blue]
      >On Wed, 03 Sep 2003 05:11:03 +0000, Ralph Freshour wrote:
      >[color=green]
      >> I'm using PHP and while this is an HTML question, I'm looking for a
      >> PHP answer please - I've got several anchors similar to the one shown
      >> below - I'm calling a dispatcher.php script and I need to be able to
      >> determine which anchor was clicked on even tho they will all call the
      >> same dispatcher.php script - in PHP can I detect which anchor was
      >> clicked on once I'm in the dispatcher script?
      >>
      >> <A HREF="dispatche r.php">2</A>[/color]
      >
      >Hi
      >
      >Could you allot an id to each HREF tag and try to provide that as an
      >argument to the script.
      >
      >regards
      >akr[/color]

      Comment

      • Jochen Daum

        #4
        Re: Anchor Tag Help w/PHP

        Hi Ralph!
        On Wed, 03 Sep 2003 14:04:37 GMT, Ralph Freshour <ralph@primemai l.com>
        wrote:
        [color=blue]
        >How do you assign an ID tag? I've tried:
        >
        ><A HREF="dispatche r.php" ID="num_2">2</A>[/color]

        No, try

        <A HREF="dispatche r.php?id=num_2" ID="num_2">2</A>

        and

        $_GET["id"] for PHP > 4.1

        HTH, Jochen

        [color=blue]
        >
        >But that doesn't seem to trap it in the dispatcher code where I have:
        >
        >if ($num_2)
        >{
        >etc.
        >}
        >
        >
        >On Wed, 03 Sep 2003 13:20:53 +0500, akr <therm@hotpop.c om> wrote:
        >[color=green]
        >>On Wed, 03 Sep 2003 05:11:03 +0000, Ralph Freshour wrote:
        >>[color=darkred]
        >>> I'm using PHP and while this is an HTML question, I'm looking for a
        >>> PHP answer please - I've got several anchors similar to the one shown
        >>> below - I'm calling a dispatcher.php script and I need to be able to
        >>> determine which anchor was clicked on even tho they will all call the
        >>> same dispatcher.php script - in PHP can I detect which anchor was
        >>> clicked on once I'm in the dispatcher script?
        >>>
        >>> <A HREF="dispatche r.php">2</A>[/color]
        >>
        >>Hi
        >>
        >>Could you allot an id to each HREF tag and try to provide that as an
        >>argument to the script.
        >>
        >>regards
        >>akr[/color][/color]

        --
        Jochen Daum - CANS Ltd.
        PHP DB Edit Toolkit -- PHP scripts for building
        database editing interfaces.
        Download PHP DB Edit Toolkit for free. PHP DB Edit Toolkit is a set of PHP classes makes the generation of database edit interfaces easier and faster. The main class builds tabular and form views based on a data dictionary and takes over handling of insert/update/delete and user input.

        Comment

        Working...