How to make a dynamic table in PHP?

How to call dynamic webpages in a index.php?

  • I tried a some tutorials that showed if you click on a link ex: index.php it in its URL it becomes index.php?page=sample.php using the include() I try doing it but doesn't work,I checked everything and all is correct. im using PHP5.3 ERROR: Notice: Undefined index: tutorials in C:\wamp\www\quick_login\index.php on line 21 CODE: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Untitled Document</title> </head> <body> <table width="422" height="220" border="1" cellpadding="0" cellspacing="2"> <tr> <th width="87" scope="col">Header</th> </tr> <tr> <td> <a href="index.php">Home</a><br> <a href="index.php?page=tutorials">Tutorial… </td> <td width="323"> <?php $page = $_GET['page']; if($page){ include('inc/' .$page.'.php'); } else{ echo "<b>Start Home</b>"; } ?> </td> </tr> </table> </body> </html> Does anyone know how to make it work?

  • Answer:

    If you own the php file, it's easy: <?php include "file.php"; // do work... ?> If you don't own the file, then you can't include the original file since requesting the file makes the server run it through their compiler first.

Tech? at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.