Hi there,

Pretty new to the IT industry. I'm currently doing my final project for my bachelors degree. I've almost finished and but there's just a few things i'd like to add to the core functionality of the website. I apologize if i'm in the wrong forum, if so please re-direct me!

Anyway, Basically i'd like to send a variable through the address bar and use $_get to retrieve it and update some content dynamically. Yes! this is working fine. But i'm trying to add a #anchor to the link, so when I load the new page it loads its focus to the bottom of that page, whilst also being able to use the $_get function to retrieve the variable and update the content on that page accordingly.


Here's that basic concept I have in mind...

(Before any html code, within <?php?> tags)
$leftimg = '<a href="galleries.php?left='.$cl.'#imagenav"> <img src="../images/scrollleft.png" class="imgleft"/> </a>';
$rightimg = '<a href="galleries.php?right='.$cr.'#imagenav"> <img src="../images/scrollright.png" class="imgright"/> </a>';

Near the bottom of my page I have:
<div id="imagenav"></div>



I've tried other alternatives like <a name="imagenav"></a>.

If I manually set the ?left=variable or the ?right=variable then it will load the right content, then when it's clicked a second time with the manually set variable it will navigate to the bottom of the page (On second click). I figure I'm missing some crucial information on how these two address suffixes effect each others behavior.



Any help/direction would be appreciated.