In thinking this through, would you recommend a function within the array to
create a menu?  I could pass a submenu id in the query string and if it is 
build that menu.  Here is the original message for thoughts.

I want to be
able to pull up all the items for navigation on the left menu, then each
item might have a sub item underneath it, but I only want to call them
when you are on that section. The code is below.
Example, when you first hit the page you will see 5 sections on the left,
clicking one of them will open that page and the SUB pages under it.
So, you would see
On the first page, click Alex and you would see:

$connection = mssql_connect("parks2","sa","");
$db = mssql_select_db("wmn_test",$connection);
$sql = "select bp_section_id,bp_section_name from bp_sections order by 
$sql_result = mssql_query($sql);
while ($row = mssql_fetch_array($sql_result)){
$bp_section_id = $row["bp_section_id"];
$bp_section_name = $row["bp_section_name"];
$ln = "<tr><td><a 
$new_data[] = $ln;
$sqlsub = "select bps_section_id,bps_section_name from bp_sub_sections 
where fk_section_id ='$sectionid'";
$sql2_result = mssql_query($sqlsub);
while ($row = mssql_fetch_array($sql2_result)){
$bps_section_id = $row["bps_section_id"];
$bps_section_name = $row["bps_section_name"];
$ln = "<tr><td><a 

$new_data3[] = $ln;
$displn1 = implode("",$new_data);
$displn2 = implode("",$new_data3);
$displn = ("$displn1,$displn2");
$connection = mssql_connect("parks2","sa","90Pitt!!");
$db = mssql_select_db("wmn_test",$connection);
$sql = "select template_content from bp_sections inner join bp_templates on 
template_id = bp_sections.fk_template_id where bp_section_id = '$sectionid'";
$sql_result = mssql_query($sql);
($row = mssql_fetch_array($sql_result));
$template = $row["template_content"];
$temp = str_replace("[LEFT NAV]",$displn,$template);
$temp2 = str_replace("[GRAPHIC HEADER]",$graphic_header,$temp);
$temp3 = str_replace("[RIGHT CONTENT]",$right_content,$temp2);
$temp4 = str_replace("[BODY GRAPHIC]",$body_graphic,$temp3);
$temp5 = str_replace("[BODY DATA]",$body,$temp4);
echo $temp5;

PHP General Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to