Re: how to pass variable and an internal link

From: Date: Wed, 20 Feb 2002 20:20:19 +0000
Subject: Re: how to pass variable and an internal link
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-85582@lists.php.net to get a copy of this message
Hey Sergio: Jena wrote: > > how can I pass either the internal anchor and the variable in the url? > > I tried in many ways > echo "<a href=\"page.php#my_anchor?variable=" . $my_variable . > "\">go to</a>"; > echo "<a href=\"page.php?variable=" . $my_variable . > "#my_anchor\">go to</a>"; This URL works for me: http://66.39.64.134/teams.htm?LeagueID=ncaab#d27 So, your second attempt should work. Personally, I'd rewrite your line as this: echo "<a href=\"page.php?variable=$my_variable#my_anchor\">go to</a>\n"; If this doesn't working for you, there's something wrong with the HTML in "page.php" or with your browser. Most likely, you haven't set the name/id anchor correctly. Enjoy, --Dan -- PHP scripts that make your job easier http://www.analysisandsolutions.com/code/ SQL Solution | Layout Solution | Form Solution T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Ave, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.general (#85582) next »