MeltingDog
MeltingDog

Reputation: 15404

Anchor tags in URL with PHP variables?

I have an anchor tag in my page as such:

<div name="anchor">

I want to include a link to this anchor in a url that is also populated with PHP vars, eg:

mysite.com/index.php?id=60&teamid=105#anchor

But this does not work. I have also tried:

mysite.com/index.php#anchor?id=60&teamid=105

But no luck there either.

Does anyone know the correct way of doing this?

Upvotes: 0

Views: 72

Answers (1)

aqab0N
aqab0N

Reputation: 106

Try

<div id="anchor">

and

mysite.com/index.php?id=60&teamid=105#anchor

The number sign points to ids - not names.

Upvotes: 4

Related Questions