This may sound like a question I shouldn't need to ask, but here I am asking it...

In a PHP page I am doing some simple html stuff, where there is a reference in a paragraph to information on another part of the page (rather lengthy document)...

in html I would just use an anchor <a name='Achievement'></a>

and then when I want to reference it provide a link See <a href='Achievement'>'Achievement Titles and Rewards'</a>

so when they clicked on the link, it takes them to the anchor...

For some reason, it isn't taking me to the anchor, but rather taking me back to the index page.

Does this simply not work in a php document, or am I missing something in the use of it.

Thanks in advance for your response, and I apologize if this is something that I should know, but I apparently don't.


Recommended Answers

All 4 Replies

Try this instead.

 <a href='#Achievement'>'Achievement Titles and Rewards'</a>

I don't understand why you'd be apologizing...but I forgive you if that makes you feel better...

Try this...

 <a href="#anchorName">Text</a>
commented: Thank you for the jog in my memory +2

Thank you for the answer I was looking for..

had to know it would be something as simple as a missing #

the aploogy to to circumvent anyone that would want to come back with some snide remark about it, which I have gotten a few times over the years.

But I do appreciate you pointing out my oversight...

thanks again

I understand. You shouldn't have to apologize. No one is born with all knowledge. If someone is rude to you, you have the option to down vote the remark.

Glad that solved your issue.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.