Jump to content

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>");

 

 

 

?>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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