Hi,
Can someone tell me, how can I use html anchor and bookmark elements to make links from one page to some text on another page in PHP?
Thanks
Rahul
HTML Anchor and Bookmark elements in PHP
Originally posted by rahul_raj77
Hi,
Can someone tell me, how can I use html anchor and bookmark elements to make links from one page to some text on another page in PHP?
Thanks
Rahul
Use HTML.
<a href="page2.php#section3">section 3</a>
It that answer isn't specific enough, you need to be more specific with your question and perhaps post some code.
- keith
Hi Keith,
Sorry about that.
I mean,
in page1.php I have code
<a href="#anchor1">go to news number 2, in page2.php</a>
in page2.php,
<a name="anchor1">News#2</a>
I think Iam clear now.
THanks.
Originally posted by rahul_raj77
Hi Keith,
Sorry about that.
I mean,
in page1.php I have code
<a href="#anchor1">go to news number 2, in page2.php</a>
in page2.php,
<a name="anchor1">News#2</a>
I think Iam clear now.
THanks.
you're still only asking an HTML question, not a PHP question. In that respect, you're link on page1.php needs to include the page name then the anchor name.
<a href="page2.php#anchor1">got to news number 2 in page2.php</a>
your code is right for the anchor in page2.php.
Now are these links being generated on the fly by PHP or are they static links that you manually enter into the pages?
- keith
they are generated on the fly from data retrieved from a database.
Originally posted by rahul_raj77
they are generated on the fly from data retrieved from a database.
Post some of the code that retrieves the data and what you are trying to do to create the links and we'll show you where it needs to be changed.
- keith