Jump to content

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?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.