- <?
- include ("connexion.inc.php");
- if ($test==1){
-
- $query = "show tables";
- $result = mysql_query($query);
- $num_results = mysql_num_rows($result);
- for ($i = 0; $i < $num_results; $i++)
- {
- $row = mysql_fetch_array($result);
- $rs=mysql_query("SELECT * FROM ". $row[0] ."");
- $cols = mysql_num_fields($rs);
- echo "<b>";
- echo $row[0];
- echo "</b><br>";
- for ($j = 0; $j < $cols; $j++) {
- $type = mysql_field_type($rs, $j);
- $name = mysql_field_name($rs, $j);
- echo $type;
- echo " -- ";
- echo $name;
- echo "<br>";
- }
- }
-
- }else{
-
- } ?>
- <body>
- <form name="form1" method="post" action="<? PHP_SELF ?>">
- <p>
- <input type="text" name="larecherche">
- </p>
- <p>
- <input type="submit" name="Submit" value="Envoyer">
- <input type="hidden" name="test" value="1">
- </p>
- </form>
<?
include ("connexion.inc.php");
if ($test==1){
$query = "show tables";
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
for ($i = 0; $i < $num_results; $i++)
{
$row = mysql_fetch_array($result);
$rs=mysql_query("SELECT * FROM ". $row[0] ."");
$cols = mysql_num_fields($rs);
echo "<b>";
echo $row[0];
echo "</b><br>";
for ($j = 0; $j < $cols; $j++) {
$type = mysql_field_type($rs, $j);
$name = mysql_field_name($rs, $j);
echo $type;
echo " -- ";
echo $name;
echo "<br>";
}
}
}else{
} ?>
<body>
<form name="form1" method="post" action="<? PHP_SELF ?>">
<p>
<input type="text" name="larecherche">
</p>
<p>
<input type="submit" name="Submit" value="Envoyer">
<input type="hidden" name="test" value="1">
</p>
</form>