Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:43

passing variables...


Poster: emiljansson
Dated: Saturday January 20 2007 - 0:41:32 GMT

Hi

An old question i know but i can't put variables in my php/mysql setup.
php will not execute it at all.

like: user?id=<?php $user; ?> (i have tryed all possible way that i know to write it. inc print...)

I have made the .js to .php renaming of the menu_data file...

what more can it be?

/e


Poster: Andy
Dated: Saturday January 20 2007 - 8:47:07 GMT

Can you send over a sample of how you are adding the variable?

Is it being added in the database or inside php?


Poster: emiljansson
Dated: Saturday January 20 2007 - 14:15:55 GMT

http://www.kvickstream.se/demo.php

and i add the variables in the database exactly like this:
account.php?id=<?php $user_id; ?>

/e


Poster: Andy
Dated: Sunday January 21 2007 - 0:02:28 GMT

Hi,

You need to echo the variable, like this:

aI("text=Mitt konto;url=admin/account.php?id=<? echo $user_id; ?>;");


Poster: emiljansson
Dated: Monday January 22 2007 - 9:05:39 GMT

Hi,

Sorry but i didn't work, get the same results.
Changning to do a funktion for it instead.

I got an other probelm too, the first time the menu loads it give the mm_style is unidentified, but it works and dissaperar after reload.

how can i correkt that probelm?

/e


Andy wrote:
Hi,

You need to echo the variable, like this:

aI("text=Mitt konto;url=admin/account.php?id=<? echo $user_id; ?>;");


Poster: Andy
Dated: Monday January 22 2007 - 17:44:41 GMT

There must be something else going on here.

Does the PHP menu "out of the box" work on your site?

-- Andy


Poster: emiljansson
Dated: Tuesday January 23 2007 - 9:59:47 GMT

Nopp,

for example... the <script language="JavaScript" src="http://www.xxx.xx/menu/menu_data.php" type="text/javascript"></script> is not by default in the index.php file that's in the package.

Acctually, the demo that i downloaded at first was working well but when i buyd the license the code was rewrighten and wasn't working.

And for extra information, the .zip file had even more error then the .tar file.

And the link to mmenudom.js and mmenuns4.js has been change to be included in the mm_phpmenu.php file. that's the changes that i can see now and difference from the working one for me.

/e


Poster: Andy
Dated: Tuesday January 23 2007 - 21:53:18 GMT

When I visit http://www.kvickstream.se/demo.php I get an error: mm_style is undefined.

This looks like it is because you are calling http://www.kvickstream.se/menu/menu_data.php before you have executed the menu code files and thus objects are not available

I have double checked this line of code and it's working fine: aI("text=Mitt konto;url=admin/account.php?id=<? echo $user_id; ?>;");


Poster: emiljansson
Dated: Wednesday January 24 2007 - 10:29:28 GMT

Right, now i get it :)

the demo script that í downloaded had the above link i think but the funktion is already in mm_phpmenu.php. My misstake!

Now i instead got the _menuCloseDelay is undentifyed error but the php code just putout menuCloseDelay (no underscore _ in front).

So i just replaced all the funktions names in the .js files so it dosn't search for the _underscore funktion and now it all works like a charme.

I'm gone nock my head for a cupple of hour now with the $user_id funktion that still dont work.

So thanks for all help with this one for now and let's close this one! :)

BR/
Emil


Poster: Andy
Dated: Wednesday January 24 2007 - 10:34:22 GMT

There was a few changes made to the PHP Based sample a few days ago. I guess this caused you a few problems.

If you have anymore issues, please download the menu again and update all php files. And by all means contact us again if you have anymore problems.

Cheers,
Andy