Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Current menu bar in list and detail page

Guest
May 16, 2007 May 16, 2007
I have created two pages, one that shows a list and the other that shows the details. On the list page I have placed a navigation that is from the database. I was able to show my selection as current through CSS. However, when I click on details for my details.php page my selection from my menu is not selected.

I have made a php include within both pages.

For both list.php and details.php I have placed a record set for the navigation as follows...
SELECT *
FROM jobtype
WHERE online = 1
ORDER BY jobOrder ASC

For the list.php record set is as follows...
SELECT jobID, jobTitle, jobDescrip, jobDownload, online
FROM job
WHERE online = 1 AND job.jobTypeID = 'jobType'
ORDER BY jobTitle ASC

Variables
Name = jobType
Default Value = -1
Run-Time Value = $_GET['jobTypeID']

For my include regSideJob.php is as follows...
<?php if ($totalRows_rsJobTypes > 0) { // Show if recordset not empty ?>
<ul>
<?php do { ?>
<li <?php if($_GET['jobTypeID'] == $row_rsJobTypes['jobTypeID']){?>class="current" id="current"<?php } ?>><a href="index.php?jobTypeID=<?php echo $row_rsJobTypes['jobTypeID']; ?>" ><?php echo $row_rsJobTypes['jobName']; ?></a></li>
<?php } while ($row_rsJobTypes = mysql_fetch_assoc($rsJobTypes)); ?>
</ul>
<?php } // Show if recordset not empty ?>


I am stuck because when viewing in details.php my current is not highlighted as if I were to view it in the list.php page.


TOPICS
Server side applications
235
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 17, 2007 May 17, 2007
LATEST
Does any body have a clue?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines