By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,619 Members | 2,309 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,619 IT Pros & Developers. It's quick & easy.

Anchor Tag Help w/PHP

P: n/a
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="dispatcher.php">2</A>

Jul 16 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
akr
On Wed, 03 Sep 2003 05:11:03 +0000, Ralph Freshour wrote:
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="dispatcher.php">2</A>


Hi

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

regards
akr
Jul 16 '05 #2

P: n/a
How do you assign an ID tag? I've tried:

<A HREF="dispatcher.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 <th***@hotpop.com> wrote:
On Wed, 03 Sep 2003 05:11:03 +0000, Ralph Freshour wrote:
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="dispatcher.php">2</A>


Hi

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

regards
akr


Jul 16 '05 #3

P: n/a
Hi Ralph!
On Wed, 03 Sep 2003 14:04:37 GMT, Ralph Freshour <ra***@primemail.com>
wrote:
How do you assign an ID tag? I've tried:

<A HREF="dispatcher.php" ID="num_2">2</A>
No, try

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

and

$_GET["id"] for PHP > 4.1

HTH, Jochen


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 <th***@hotpop.com> wrote:
On Wed, 03 Sep 2003 05:11:03 +0000, Ralph Freshour wrote:
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="dispatcher.php">2</A>


Hi

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

regards
akr


--
Jochen Daum - CANS Ltd.
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces.
http://sourceforge.net/projects/phpdbedittk/
Jul 16 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.