whoops, still haven't been able to test it, but I see I'm, missing a dot, so it should be:
echo "<a href=\"".$_SERVER['PHP_SELF'].$_SERVER ["QUERY_STRING"]."#top\">top</a>"; > I think it's something like > > echo "<a href=\""$_SERVER['PHP_SELF'].$_SERVER > ["QUERY_STRING"]."#top\">top</a>"; > > but that's off the top of my head (as we don't have an SQL enviroment > at work for me to test it with). > > Jake > > > Hello, > > > > I am trying to add a back to top of page link to PHP dynamically > generated > > pages. The header and footers for these page never change so the > anchor is > > in the header and the link in the footer. > > > > Header Anchor: > > > > <a name="top"></a> > > > > HARD CODE link used in the body of the static pages (which I want to > pull > > out to place in the footer!) > > > > <a href="index.php?main_page=index#top" title="Back to Top"><img > > src="images/button_top.gif" alt="Back to top" width="86" height="20" > > border="0" class="rollover" /></a> > > > > Now my PHP skills are weak but growing stronger, which is why I am > asking > > for the help here. As the pages are long in many cases (requiring > two or > > more page-downs), I desperately want to improve accessibility by > including > > the back to top link on all pages. > > > > So what I want to make happen is to is have the <a href= tag > > index.php?main_page=index (or whatever page this happens to be on) > filled in > > by the php and then add the #top at the end so that is it all > autonomous and > > I can put this on ANY and all pages) > > > > While I have it working in some pages as a hard coded link, I can't > figure > > out what to place where in regards to the PHP. I am trying > > basename($PHP_SELF) but am lost now as I am over my head here. > > > > Thanks > > > > ***************************************************** > > The discussion list for http://webstandardsgroup.org/ > > See http://webstandardsgroup.org/mail/guidelines.cfm > > for some hints on posting to the list & getting help > > ***************************************************** > > > > > > > > > ***************************************************** > The discussion list for http://webstandardsgroup.org/ > See http://webstandardsgroup.org/mail/guidelines.cfm > for some hints on posting to the list & getting help > ***************************************************** > > > ***************************************************** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help *****************************************************
