Forming an anchor link including get variables

Associate
Joined
19 Jun 2006
Posts
162
Location
Swansea, Wales
OK, I have a php page that query's a database and returns the correct results because it is passed variables when it is linked to...

<a href="staff.php?fromPub='.$pub.'&amp;pubName='.$pubName.'" title="Go to staff">Go to staff >>></a>

That gives me this url ending...

staff.php?fromPub=thelion&pubName=The%20Lion

I pull out each staff member and now i want to create an anchor to each person.

So i tried this...

<a href="staff.php#'.$row["name"].'?fromPub='.$pubLink.'&amp;pubName='.$pubName.'">'.$row["name"].'</a></li>

But it just loses the pubLink and pubName info so no staff are returned. Is it even possible to place anchors in a link which already is passing GET variables?

I hope this is understandable! Any ideas?
 
Hold on, is the page being reloaded or do you just want it to jump down to the staff name further down the same page?

If so just make the link #$row["name"] to jump to it
 
Back
Top Bottom