[PHP] how to pass variable and an internal link

2002-02-20 Thread Jena


Hi 
I've encountered a little  (I hope) problem

I can put an anchor on a page to create an internal link writing
a name=my_anchor and then reach it with a normal link writing
echo a href=\page.php#my_anchor\go to my_anchor/a;

but to me is necessary to add a variabale to this link
usually I write somthing like this:
echo a href=\page.php?variable= . $my_variable . \go to/a;

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;
but nothing to do;
can someone help me?

Many thank in advance

Sergio

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] how to pass variable and an internal link

2002-02-20 Thread Analysis and Solutions

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 11232v: 718-854-0335f: 718-854-0409

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php