casey_00 Posted March 29, 2007 Share Posted March 29, 2007 Easy to fix problem if you understand php ???.... but i just know how to crop it. :-X this is the script i have in the body: you can see it at wrap-away.com <?php $page=$_REQUEST["page"]; $subpage=$_REQUEST["subpage"]; $path2=$_REQUEST["path2"]; $path=$_REQUEST["path"]; include ("auth.php"); if(!isset($page)){ $page = "home"; } if(isset($page)){ if (isset($path)) { $path = $path."/"; }else { $path = ''; } if (isset($path2)) { $path2 = $path2."/"; }else { $path2 = ''; } // start page options + subpages if(!isset($subpage)){ //echo "$path$page.php"; if (file_exists("$path2$path$page.php")){ include("$path2$path$page.php"); } else { include("page_not_found.php"); } } else { if (file_exists($path2.$path.$page.'_'.$subpage.'.php')){ include($path2.$path.$page.'_'.$subpage.'.php'); } else { include("page_not_found.php"); } } // end page options + subpages } else { include("home.php"); } ?> </td></tr></table> aNY HELP would rock Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted March 29, 2007 Share Posted March 29, 2007 The error you are seeing isn't really an error...it's php notifying you that at some point in the code it is addressing an index in an array that doesn't exist. It's not affecting anything. You can fix it two ways...look through your code for the index that it's saying doesn't exist and make sure that it exists before it calls it: //will give undefined index notice: echo $some_array['name']; //will not give notice: $some_array = array(); $some_array['name'] = "bob"; echo $some_array['name']; Or reduce the error reporting level by putting this line at the very top of your page: error_reporting(E_ALL ^ E_NOTICE); Quote Link to comment Share on other sites More sharing options...
casey_00 Posted March 29, 2007 Author Share Posted March 29, 2007 im really dumb ???when talking about arrays etc... this script was meant to allow me not to insert every page name in the body and also stop me from having to place something on every page. is there anything i can add to the above code that will make it all cool... without having to insert all the page names? :-\ thanks man Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted March 29, 2007 Share Posted March 29, 2007 Or reduce the error reporting level by putting this line at the very top of your page: error_reporting(E_ALL ^ E_NOTICE); Quote Link to comment Share on other sites More sharing options...
casey_00 Posted March 29, 2007 Author Share Posted March 29, 2007 thanx man.. much appreciated.. all working now Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.