Jump to content

passing php from one page to another in a url


JLG

Recommended Posts

I'm really not good at PHP or JavaScript so i'm hoping someone will be able to cure this problem really easily. I've done searches but even this simple stuff is a bit over my head.I have a menu which when clicked on shows submenu item underneith. When a sub menu item is clicked on it goes to another page (without a menu on), on that page i have a link saying back. When they go back to the original page with the menu on i would like the sub menu to still be shown.at the moment i have this piece of code on the menu page:

<?phpif(!isset($Menu)) {$Menu = "1";} print "<script language=\"javascript1.2\" type=\"text/javascript\">toggleview('menu".$Menu."')</script>\n";?>

this code opens the submenu when i go to the page but i only want it open the submenu when /intro.php?Menu=1 is in the URL not when it is just /intro.php (or anything else).I can't put links up cuz i'm on an internal intranet system, i hope this make sense to someone. Please help.

Link to comment
Share on other sites

Doesn't matter i cured it with:<?phpif(isset($_GET['Menu'])) { print "<script language=\"javascript1.2\" type=\"text/javascript\">toggleview('menu".$_GET['Menu']."')</script>\n";}?>I was just being thick.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...