[thelist] PHP - Passing Variable in URL with Anchor Trouble!

Poojie poojie at dccnet.com
Fri Aug 17 17:50:44 CDT 2001


<snip>
\********
*******
 print "<a
href='http://$web_address/index.php?main=cleaningtips.php?room=".$c
lean_arra
y
**
["Room"]."&surface=".$clean_array["Surface"]."&stain=".$clean_array
["Stain"]
."&id=".$clean_array["ID"]."' ** target='new'>view</a>\n";
*******
********/
</snip>

You can only have one '?' per URL, logically enough -- it seperates
the page to load from the data to send to it.

Workaround: Send all of the variables to index.php and then have
index.php send them to cleaningtips.php. ie:

http://www.myweb.com/index.php?main=cleaningtips.php&room=KITCHEN&a
nother=this&another=that


Then have index.php load cleaningtips.php with all the variables
(other than $main which it doesn't need).

I would write the code out, but that is your job not mine :]

Daryl







More information about the thelist mailing list