You just need to add a question mark, the name of the variable, an equal
sign and its value (properly encoded):

echo '<a href=myurl?myvalue=' . urlencode ($value) . '>';

In the receiving script, you can read the value using $_GET['myvalue'];

Hope this helps!

php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers

Come visit us at!
--- Begin Message ---
Hello all,

I have a php script that reads all the files in a directory (pictures), the
outputs each picture as a link to be displayed in the main frame of the html
page. All of that works fine. I want to be able to "pretty up" the picture
out put by placing the picture into a html table so it is centered, add
color, etc. But I cannot seem to figure out how to pass the variable from
the menu page to the main frame page without using a goofy gray button form.
Anyone know how to pass a variable on just a link alone?


PHP General Mailing List (
To unsubscribe, visit:

--- End Message ---
PHP General Mailing List (
To unsubscribe, visit:

Reply via email to