View Full Version : The $_GET challenge

07-05-2005, 07:10 PM
In my code I would like to append a $_GET)-variable (an id) to a link.
the variable looks like this
id='".$id."' this shoud be appended to a link. When the link is clicked the next page can get the id out of the url.
The links and the id's are generated with a while-loop.
The while-loop generates this:

echo "<a href=\"javascript:PopupPic('".$bestandsnaam."')\">"
echo "<img src='".$bestandsnaam."' border='0' height='60'></a>"

Because each link has a unique id I would like the unique id to be appended somewhere in it's appropriate link. The problem that the link refers to a javascript somewhere in the code. You can check the javascript here:

<script language="Javascript"> function PopupPic(sPicURL) { window.open( "../../lib/php/popup.inc.php?"+sPicURL, "", "resizable=1,HEIGHT=200,WIDTH=200"); } </script>

I don't want the id appended in this piece of javascript-code :
When the id is appended in this code, the value of the id is the last value that came out the while-loop and that's not what I need.
So I need the id to be in the link generated by the while-loop

Can somebody help me with the issue.

07-06-2005, 02:53 AM
if you want the unique id of each value through the loop then you need to place the link inside the loop itself so that when you loop through it will display the link with the apropriate ID for each set of values. i hope this is what u mean as it was a little hard to understand

07-06-2005, 10:47 AM
thanks a lot

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum