Jump to content

Multiple Variables in URL???


JakeSilver

Recommended Posts

Hi there!

 

I am trying to pass multiple variables in a url as follows

 

	print "<a href=\"section.php?id=$pagelink&ipanel=" . ($index - $count) . "\"><img src='recent.jpg' id='recent'></a> ";

 

however the URL is displayed as follows:- ???

 

http://www.??????.com/section.php?id=&ipanel=5

 

It shows the varible ipanel easily but does not show the "id="  There is definatly a value in $pagelink as i have echoed it at the bottom of the page and i can see that its value is correct?

 

any solutions?

 

Many thanks

 

Jake ;D

Link to comment
https://forums.phpfreaks.com/topic/112588-multiple-variables-in-url/
Share on other sites

I took the & out... but im sure & was used for the "&" And sign.. the code is now as follows

 

print "<a href=\"section.php?id=$pagelink&ipanel=" . ($index - $count) . "\"><img src='recent.jpg' id='recent'></a> ";

 

But again the  same problem exsist where it does not display the first variable ("id")

 

how do i go about seperating the variable from the & sign?

 

got any ideas?

 

Thanks

Revaz:- I have just posted the code without the ipanel variable and your right it doesnt show it there either... so therefore the varible appears to be empty.. However at the bottom of the page i echo the varible $pagelink and am given the value of 1 which is correct. I do not understand how this varible is displayed in the page but not in the url?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.