Page 1 of 1

& missing in url

Posted: Sat Jan 05, 2008 4:00 am
by dlmaster
Hi,


PHP Code:
<a href="home.php?user=<?php echo $id ?>&adr=<?php echo $adr[$j]?>"><?php echo $tt[$j] ?></a><br>
PHP Code:
echo "<a href='home.php?user=$id&adr=$adr[$j]'>$tt[$j]</a><br>";

I have tried both of this code to pass the value of adr to the page mentioned but the & symbol is not in the url... I still cannoot get the value of adr using $_GET. 8O

In url box:

...home.php?user=abc&adr=def

but when mouse-over the link:

...home.php?user=abcadr=def


Is there anything wrong? I even try

<a href="home.php?user=<?php echo $id;?>&adr=<?php echo $adr[$j];?>"><?php echo $tt[$j]; ?></a><br>

I test on IE7, the & is visible but in the end I still cannot get the value using $_GET.

Please advise.... Thank you. :oops:

Posted: Sat Jan 05, 2008 7:40 am
by andylyon87
Hey

You could repl the & with & to get it to work in a url

hope that helps

Posted: Sat Jan 05, 2008 1:53 pm
by Jonah Bron
Try testing the page without php.

Like

Code: Select all

<a href="home.php?user=5&adr=some_page.html">Some text</a>
And see if it still doesn't work.