Help - Search - Member List - Calendar
Full Version: menu problem..
WorkTheWeb Forums > Webmaster Resources > PHP Help
Support our Sponsors!
Lester3
i'm quite new to php so forgive me if this looks obvious, i'm trying to
create this menu tree but struggling, could somebody have a look? i'm
declaring variables by saying for example:

page.php?page=products&sub=ipdb

hope you can help,
thanks, matt

the code:


function nav(){


if ($page == "products"){
$menu_products = true;
}else {
$menu_products = false;
}

if ($sub == "ipdb"){
$nav_sub_str = "<tr><td><a href="a_services.php?page=services"><span
class="submenubullet">&nbsp;&nbsp;- IPDB Addin</span></a></td></tr>";
}else {
$menu_sub_ipdb = '';

}

if ($menu_products = true){
echo "<tr><td><a href="a_ipdb.php?page=ipdb"><span
class="submenubulletbold">&nbsp;&nbsp;IPDB</span></a></td></tr>";
echo $nav_sub_str;
echo "<tr><td><a href="a_ipdb_features.php?page=ipdb"><span
class="submenubulletbold">&nbsp;&nbsp;TCMS</span></a></td></tr>
<tr><td><a href="a_ipdb_requirements.php?page=ipdb"><span
class="submenubulletbold">&nbsp;&nbsp;Hardware &
Software</span></a></td></tr>
<tr><td><a href="a_ipdb_support.php?page=ipdb"><span
class="submenubulletbold">&nbsp;&nbsp;Project
Management</span></a></td></tr>
<tr><td><a href="a_ipdb_screenshots.php?page=ipdb"><span
class="submenubulletbold">&nbsp;&nbsp;Strategic
Planning</span></a></td></tr>
<tr><td><a href="a_ipdb_downloads.php?page=ipdb"><span
class="submenubulletbold">&nbsp;&nbsp;Training</span></a></td></tr>";
}

}

Kimmo Laine
"Lester3" <[Email Removed]> kirjoitti
viestiss:WHDwe.8107$[Email Removed]...
QUOTE
i'm quite new to php so forgive me if this looks obvious, i'm trying to
create this menu tree but struggling, could somebody have a look? i'm
declaring variables by saying for example:

page.php?page=products&sub=ipdb

hope you can help,


You forgot to say what the problem was, but as I look into my crystal ball,
it would seem you are having trouble with $page not being "products" and
$sub not being "ipdb" and you are wondering why.

A wild guess is that you are using a more secure php installation, than what
was used to create the example(?). Instead of being directly accessible
variables, your variables via url can be found in $_GET['page'] and
$_GET['sub'].

If I answered to wrong question, it's merely because you didn't ask anything
and my crystal ball is malfunctioning.

--
"I am pro death penalty. That way people learn
their lesson for the next time." -- Britney Spears

[Email Removed]


PHP Help | Linux Help | Web Hosting | Reseller Hosting | SSL Hosting
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2006 Invision Power Services, Inc.