I will post the jist of my files, excluding info that is not nessessary.
index.php
Code: Select all
include("../assets/php/menu/menu.php");
include("../assets/php/menu/content_subsection_menu.php");
$currentSectionID = getSectionID();
$subsection_query = "SELECT * FROM subsection WHERE id = '$currentSectionID'";
$subsection_results = dbquery($subsection_query);
genCurrentSubMenu($siteURL, $TESTCSS, $currentSection, $currentSubSection, $subsection_results);
//THIS WORKS EXACTLY AS IT SHOULD
genSubContentMenu($siteURL, $TESTCSS, $currentSection, $currentSubSection, $subsection_results);
//THIS DOES NOT WORK AT ALLCode: Select all
function genCurrentSubMenu($siteURL, $TESTCSS, $currentSection, $currentSubSection, $subsection_results)
{
HTML
while($subsection_data = mysql_fetch_array($subsection_results))
{
echo "$subsection_data[subsection]";
}
}Code: Select all
function genSubContentMenu($siteURL, $TESTCSS, $currentSection, $currentSubSection, $subsection_results)
{
HTML
while($subsection_data = mysql_fetch_array($subsection_results))
{
echo "$subsection_data[subsection]";
}
}now the 2nd one prints nothing, not even an error code. When i try to echo w/o fetching the array, it gives me a reasource ID # 12 or something.
I see no reason that this should not work. I have many other things that doe not work. I am able to echo other variables that are passed to the function. I just cant seam to get this to work.
what i might do is to write a function that is independent of the HTML code around it, and that jsut echos the data, and then i could jsut call that, but i would rather have it work this way, and i know that this is a run on sentence, and i know there are alot of spe;lling errors, but it is really late and i am really tired.
Hope that this made since.
Thanks