thebeing Posted September 29, 2006 Share Posted September 29, 2006 Hello! i'm having some problem with some php code...the problem :i get this error...[code]Notice: Undefined variable: showCategories in c:\program files\easyphp1-8\www\joke_site\templates\MainHeader.php on line 86[/code]for this code... [quote] <?=$showCategories?>[/quote]can anyone help me, please? can anyone tell me, what must i write in the code to make it work?thnx in advance! Quote Link to comment Share on other sites More sharing options...
steveclondon Posted September 29, 2006 Share Posted September 29, 2006 $showCategories has no value. You must first set a value for this as follows. $showCategories='it will now be this message';echo $showCategories;If this is part of a bigger script you have you might want to put it up here as i would imagine there is another problem there higher up Quote Link to comment Share on other sites More sharing options...
thebeing Posted September 29, 2006 Author Share Posted September 29, 2006 hello, and thnx for your reply...i thought of inserting a bigger part of the code into my post...but most of it would have been irrelevand...however...if ur willing to help me (please, be!), here's a bigger part of the code... http://tinyurl.com/ewcrqnote : the memberblock thinggie works... but the categories and the buttonbanner don't...this is a part from a script i bought from someone over the net...and now he(or she...) doesn't answe when i try to contact him/her... :( Quote Link to comment Share on other sites More sharing options...
steveclondon Posted September 29, 2006 Share Posted September 29, 2006 thats just a main header that shows the information from the php script. You should have code that goes above that. If you have a file named index.php have a look at that and see all the files listed in thatyou might have for example. include 'top.php'; Quote Link to comment Share on other sites More sharing options...
thebeing Posted September 29, 2006 Author Share Posted September 29, 2006 i did as you said... from [code] <?=$showCategories?>[/code] i made [code] <? $showcategories='showcategory.php' ?> [/code] ...but, in showcategory.php i have these errors :[code] Notice: Undefined index: CategoryID in c:\program files\easyphp1-8\www\e_site\showcategory.php on line 6Notice: Undefined index: CategoryID in c:\program files\easyphp1-8\www\e_site\showcategory.php on line 12[/code]This is how line 6 and 12 look in the php :line 6[code] $q1 = "select CategoryName from dd_categories where CategoryID = '$_GET[CategoryID]' ";[/code]line 12[code]$MainQuery = "select * from dd_items where ItemCategory = '$_GET[CategoryID]' and ItemStatus = 'approved' "; [/code]it also gives the same errors for the connect.php, which is the... connect config file...two errors 1. [code][b]Notice: Undefined variable: categories in c:\program files\easyphp1-8\www\e_site\conn.php on line 42[/b][/code]and the 2. Notice: Undefined index: CategoryID in c:\program files\easyphp1-8\www\joke_site\conn.php on line 44...the code in the connect php is :[code]line 42 $categories .= "<a class=CatLinks href=\"ShowCategory.php?CategoryID=$ac[CategoryID]\">$ac[CategoryName] ($ain[0])</a><br>\n\t\t\t";line 44 if($_GET['CategoryID'] == $ac['CategoryID'])[/code]...can you still guide me? please? 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.