leijae Posted December 1, 2009 Share Posted December 1, 2009 I have 2 pages index.php and classes.php This is the code i want to configure in index.php: <li> <h2>Education Classes</h2> <ul> <li><a href="classes.php">K. - 4th</a> <span>All K. through 4th grade ed. sites listed here.</span></li> <li><a href="classes.php">4th - 8th</a> <span>All 4th through 8th sites listed here.</span></li> <li><a href="classes.php">8th - 12th</a> <span>All 8th through 12th sites are listed here.</span> </li> <li><a href="classes.php">other</a> <span>Special education sites listed here.</span> </li> </ul> </li> This my code being used in classes.php: <?php $dirname = "classes/k4/"; $dir = opendir($dirname); ?> //more html and stuff here <h1 class="title"><a href="#">K-4th Education Websites</a></h1> <div class="entry"> <p><?php while(false != ($file = readdir($dir))) { if(($file != ".") and ($file != "..")) { echo("<a href='$dirname$file'>$file</a> <br />"); } } ?> </p> </div> When I click 4-8, I want the contents, aka $dirname, of folder "48" to be listed. for 8-12: folder 812, and other: other any help would be appreciated. thanks! Link to comment https://forums.phpfreaks.com/topic/183500-assigning-a-list-to-a-table-on-a-different-page-when-a-link-is-clicked/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.