473,503 Members | 13,381 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Jul 16 '05 #1
3 10698
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2077
by: Astra | last post by:
Hi everybody Need your help. I have a DB-extracted list of say 5 items per page, which have links on each one that takes you to more detailed info on the 'clicked' particular item. When you...
6
27629
by: Daniele Baroncelli | last post by:
Hi guys, I would like to change the text in an anchor. es. from <a id="idanchor">oldtext</a> to
5
25836
by: elsenraat_76 | last post by:
Hello! I was wondering if someone could help me out with a problem I'm having? I'm trying to input a javascript value into an anchor tag (from a function), but don't have an event to call the...
6
6639
by: Richard Brown | last post by:
Ok, I celebrate and rejoice in the Anchor property. So wonderful compared to the horrible 'resize' code I had to write in VB6, there is just no end to the wonders of VB.NET..... uh, ok..... BUT......
4
6950
by: CJ Taylor | last post by:
Hey, how do I use the anchor property? I have it set to Top, Left, but when I expand the form, it doesn't grow with it... What am I missing? Thanks, CJ
3
3821
by: gary | last post by:
Hi, I am trying to reference an anchor in a user control with a url. This worked in 1.1 but no longer works in 2.0. The ascx control is located in a "/include" folder If you have a...
10
2674
by: elibol | last post by:
Hi, Is there an event that fires when the back or forward button on a browser is pressed? I need an event to fire when someone clicks the back or forward button after an anchor has been set. ...
5
1727
by: Randy Webb | last post by:
The list below has the current section number, proposed anchor name, and then the current title of that section. Some make sense, some don't. There are a few that don't have proposed anchor names...
3
4506
by: Joseph Gruber | last post by:
Hi all -- I have two questions. First, I'm adding a control to my form at runtime and the control/form seems to ignore the anchor property of the runtime control. Any idea how I can get a...
5
3186
by: Meadock | last post by:
Here's an example of what i'm trying to do. At www.webpage.com/page1.php, there's a link that points to an anchor at www.webpage.com/page2.php. The syntax is: <a href="page2.php#anchor">Link</a>...
0
7213
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7298
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5610
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4698
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3187
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1526
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.