Can I include a dynamic variable in the URL?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
ukmojo
Beginner
Beginner
Posts: 4
Joined: Tue Jan 06, 2004 7:09 pm

Can I include a dynamic variable in the URL?

Post by ukmojo »

I want to pass a variable into the URL string. I'm using PHP.

This will give an idea of what I need:
aI("text=Made to order;url=displaysense_fr_outer.php?mcatid=bespoke&ref=<?php echo $mref;?>;status=Displays made to order;");

I know this won't work but it illustrates the URL I need to construct i.e. to include the $mref variable in the URL.

Can this be achieved somehow?

Any help will be greatly appreciated.
Regards,
Simon
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

That SHOULD work in a page actually. If your server supports PHP and you are in a .php page, the server will first parse through the file and put into those variables whatever you want and then send it down to the client. Once its at the client, it will appear like perfectly formed syntax (as long as the variable you echo'd into that spot doesnt contain any stray quotation marks and the like). But overall thats the way you would create dynamic links in the menu code using server side scripting.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
Post Reply