CariDotMy

 Forgot password?
 Register

ADVERTISEMENT

View: 1996|Reply: 1

'&' and a href problem

[Copy link]
Post time 5-1-2008 05:43 PM | Show all posts |Read mode
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.

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;?>&amp;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.
Reply

Use magic Report


ADVERTISEMENT


Post time 9-1-2008 10:37 AM | Show all posts
<a href="home.php?user=<?php echo ($id . "&");?>adr=<?php echo ($adr[$j]);                                                                                                                                                                 ?>"><?php echo($tt[$j]); ?></a><br>                 

Try code ni, OK ke idak.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

 

ADVERTISEMENT



 

ADVERTISEMENT


 


ADVERTISEMENT
Follow Us

ADVERTISEMENT


Mobile|Archiver|Mobile*default|About Us|CariDotMy

20-1-2025 06:37 PM GMT+8 , Processed in 0.058421 second(s), 15 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

Quick Reply To Top Return to the list