kijlstar Posted September 21, 2009 Report Share Posted September 21, 2009 (edited) Hi everyone,I am trying to make a menu that consists of lists. When a category in the left menu is clicked on, the subcategories become visible under the category and on the right the contentpage of the category is loaded. Now everything is working fine, but when I tried to make a sub-subcategory the contentpage on the right would not load even though the sub-subcategory does look fine in the left menu.Below is the code of the menu.php that encodes for the left menu: <ul class="cat"><li class="cat"><a class="cat" href=index.php?page=CATEGORY>CATEGORY</a></li><?phpif(isset( $_GET['page'] ) and $_GET['page']=='CATEGORY') {?> <ul class="subcat"> <li><a class="subcat" href=index.php?page=CATEGORYt&subpage=SUBCATEGORY>SUBCATEGORY</a></li> <?phpif(isset( $_GET['page'] ) and $_GET['page']=='CATEGORY' and isset( $_GET['subpage'] ) and $_GET['subpage']=='SUBCATEGORY') {?> <ul class="subcat"> <li><a class="subcat" href=index.php?page=CATEGORY&subpage=SUBCATEGORY&subsubpage=SUBSUBCATEGORY>SUBSUBCATEGORY</a></li> </ul> <?php } ?> <li><a class="subcat" href="#">other subcategory</a></li> <li><a class="subcat" href="#">other subcategory</a></li> <li><a class="subcat" href="#">other subcategory</a></li> </ul> <?php } ?> Now this is the code that for the content on the right: <div class="content"> <?phpif(isset( $_GET['page'] ) and $_GET['page']=='CATEGORY') {require("CATEGORY.php"); } ?> <?phpif(isset( $_GET['page'] ) and $_GET['page']=='CATEGORY' and isset( $_GET['subpage'] ) and $_GET['subpage']=='SUBCATEGORY') {require("SUBCATEGORY.php"); } ?> <?phpif(isset( $_GET['page'] ) and $_GET['page']=='CATEGORY' and isset( $_GET['subpage'] ) and $_GET['subpage']=='SUBCATEGORY') and isset( $_GET['subsubpage'] ) and $_GET['subsubpage']=='SUBSUBCATEGORY') {require("SUBSUBCATEGORY.php"); } ?> ---------------now according to my easyphp, there is a parse error in this line:if(isset( $_GET['page'] ) and $_GET['page']=='CATEGORY' and isset( $_GET['subpage'] ) and $_GET['subpage']=='SUBCATEGORY') and isset( $_GET['subsubpage'] ) and $_GET['subsubpage']=='SUBSUBCATEGORY') {but i don't understand it.I'd be very glad to hear any suggestions. Harryvan11</div> Edited September 21, 2009 by harryvan11 Link to comment Share on other sites More sharing options...
chibineku Posted September 21, 2009 Report Share Posted September 21, 2009 The operator is &&, not 'and', and there is a ) after the word subcategory in the middle of the line you said there is an error in. Link to comment Share on other sites More sharing options...
Synook Posted September 21, 2009 Report Share Posted September 21, 2009 You can actually use "and" instead of "&&", if you want to be verbose. Link to comment Share on other sites More sharing options...
kijlstar Posted September 22, 2009 Author Report Share Posted September 22, 2009 The operator is &&, not 'and', and there is a ) after the word subcategory in the middle of the line you said there is an error in.Thanks for you help! I fixed it now. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now