Sei sulla pagina 1di 1

<!

doctype html>
<html>
<head>
<meta charset="utf-8">

<title> EMPLEADOS DE UNA SUCURSAL </title>

</head>

<body>

<table width="600" border="1" cellpanding="1" cellspacing="1">

//Tabla para Empleados EJERCICIO 2

<tr>
<th>Cedula</th>
<th>Nombre</th>
<th>Direccion</th>
<th>Telefono</th>
<th>Sucursal</th>
<tr>

<?php
$con=mysqli_connect("localhost", "phpmyadmin","root","Editorial");
if($con){
echo "Conexion Exitosa... <br>";
} else{
die("Conexion fallida".mysqli_connection_error());}

$sql= "SELECT * FROM Empleado WHERE Sucursal="___________"";


echo "Tabla de Revistas de la tabla Editorial";
$resultado= mysqli_query($con,$sql);
if(mysqlo_num_rows(resultado)>0){

while($colum=mysqli_fetch_assoc($resultado)){
echo "<tr>";
echo "<td>".$colum['id_empleado'],"</td>";
echo "<td>".$colum['nombre'],"</td>";
echo "<td>".$colum['direccion'],"</td>";
echo "<td>".$colum['telefono'],"</td>";
echo "<td>".$colum['sucursal'],"</td>";
echo "</tr>"; }
} mysqli_close($con);

?>
</body>
</html>

Potrebbero piacerti anche