Jump to content

List tables ,fields on page


jkkenzie

Recommended Posts

Hi! Brothers,

i would like to list all tables from mysql database on my page then make them hyperlinks or links that when clicked, opens the page displaying the clicked table fields.

Is there a short easy example or a way of doing it. Simple code, or anybody with a way out that works good.

 

Thanks guys,

.............

Link to comment
https://forums.phpfreaks.com/topic/99490-list-tables-fields-on-page/
Share on other sites

The config.php and tablelist.php below shows only one table, how can i make it show several tables?

 

------------------

config.php

--------------------

<?php

$TableData['0@strBanks'] = "0    0        1";

$Tables['0'] = "strBanks";

$TableNames['0'] = "tblbanks";

$FKInfo['0'] = "";

$Delete = True;

$Add = True;

$Edit = True;

$Search = True;

$View = True;

$ViewTable = False;

$Form = False;

$SearchRecords = True;

$PHPValidate = True;

$JavaValidate = False;

$Navigator = False;

$RecsPerPage = 10;

$Admin = "root";

$AdminPass = "";

$FK = False;

$CSS = "default.css";

$d = True

?>

----------------------------------------------------------------------------

----------------------------------------------------------------------------

tablelist.php

-----------

<?php

require("config.php");

print("<table align=center>");

?>

<STYLE>

a:hover{color:red;};

</STYLE>

<tr><td><a href="index.php">Home</a></td></tr>

<?php

$Counter = 0;

foreach($TableNames as $Table)

{

?>

<tr><td><a href="main.php?table_id=<?php echo $Counter;?>&Action=Go"><?php echo $Table;?></a></td></tr>

<?php

$Counter++;

};

if($d==true)

{_

?>

<tr><td><a href="http://softgalaxy.net/php-mysql/Order.html">order now</a></td></tr>

<?php

}

 

print("</table>");

 

 

 

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.