Jump to content

Search the Community

Showing results for tags 'active class'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 1 result

  1. I followed a tutorial sometime back and now I want to use this script unfortunately the tutorial at the time did not cover what I am looking for but I did end up with the code below. I am wanting to have an active class dependant on users selection. I would appreciate any help. <?php echo '<ul id="nav">'; $cat_sql="SELECT * FROM administration"; $cat_query=mysqli_query($con, $cat_sql); // calling data put into associative array $cat_rs=mysqli_fetch_assoc($cat_query); do{ ?> <li><a <?php if ($current_page == "name") { ?><?php } ?>href="index.php?page=<?php echo $cat_rs['link_name']; ?>"><?php echo $cat_rs['name']; ?></a></li> <?php } while ($cat_rs=mysqli_fetch_assoc($cat_query)); echo "</ul>"; ?> <!-- need to add - class='active' --> The code above gets the field names for the buttons but I am unable to work out how to have an active class. The code is messy but have been trying all sorts to sort this. Thanks again for any pointers/help.
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.