Hi list

 

I have the following code:

 

<?

         $base = "panel";

         $conexion = mysql_connect ( 'localhost' , 'root' , 'root' );

         mysql_select_db ( $base , $conexion );

         echo "<table border='1'>";

         $resultado = mysql_query ("select * from registro" , $conexion);

         while ( $registro = mysql_fetch_row ($resultado)) {

                   echo "<tr>";

                   foreach ( $registro as $clave ) {

                            echo "<td>" . mysql_field_name($resultado, '') .
"</td>";

                   }

                   echo "</tr>";

                   echo "<tr>";

                   foreach ( $registro as $clave ) {

                            echo "<td>" . $clave . "</td>";

                   }

         }

         echo "</tr></table>";

?>

 

But the result is two TR with only the first field name of the DB.

I want to see all fields name of the DB and only in one TR… how can I do
that (in code please)?

 

Thanks.

 

+                                                                          _
   // Emiliano Boragina _

   // Diseño & Comunicación //////////////////
+                                                                          _

   // [EMAIL PROTECTED]  /
   // 15 40 58 60 02 ///////////////////////////
+                                                                          _

 

Reply via email to