Embed PHP Code to the Link

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
elly@unidux.com.sg
Beginner
Beginner
Posts: 6
Joined: Thu Nov 09, 2006 9:30 am

Embed PHP Code to the Link

Post by elly@unidux.com.sg »

I have downloaded sample of Plain Text Horizontal Style DHTML Menu Bar in .zip format

Now I got a problem to embed php variable to the link.
In menu_data.js file, I need to set the link, for example :

aI("image=http://milonic.com/menuimages/18_ab ... text=About Us;url=/aboutus.php?id='<?=session_id()?>';");

I should get the id value from the php session, but it is not working in above way. Anyone can show me how to embed it?

Thanks alot
elly@unidux.com.sg
Beginner
Beginner
Posts: 6
Joined: Thu Nov 09, 2006 9:30 am

Post by elly@unidux.com.sg »

solved!
Change the extension of the file name only! Sorry for lame posting
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

For other folks reading... elly means rename menu_data.js to menu_data.php, so that the php code in the file will be processed when the file is served.

Glad you figured it out elly... nice work!

Cheers,

Kevin
forjaes
Beginner
Beginner
Posts: 5
Joined: Mon Jun 04, 2007 12:24 pm

Post by forjaes »

kevin3442 wrote:For other folks reading... elly means rename menu_data.js to menu_data.php, so that the php code in the file will be processed when the file is served.

Glad you figured it out elly... nice work!

Cheers,

Kevin
Hi, i'm having the same problem...

I try that, with and without [include (menu_data.php);]

Help please.
Thx.
Post Reply