Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
sistemas
/
servidores
:
generarExcel.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php include("connection.php"); header("Content-Type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=servidores_".date('Y-m-d').".xls"); $con = connection(); $sql = "SELECT * FROM servidores ORDER BY id DESC"; $query = $con->query($sql); echo "<table border='1'>"; echo "<tr> <th>ID</th> <th>Nombre Servidor</th> <th>Usuario Admin</th> <th>ContraseƱa</th> <th>URL</th> <th>Base Datos</th> <th>Usuario De Base De Datos</th> <th>ContraseƱa DB</th> </tr>"; while ($row = $query->fetch_assoc()) { echo "<tr> <td>".$row['id']."</td> <td>".htmlspecialchars($row['nombre_servidor'])."</td> <td>".htmlspecialchars($row['usuario_admin'])."</td> <td>".htmlspecialchars($row['contrasena'])."</td> <td>".htmlspecialchars($row['URL'])."</td> <td>".htmlspecialchars($row['base_datos'])."</td> <td>".htmlspecialchars($row['user_DB'])."</td> <td>".htmlspecialchars($row['contrasena_DB'])."</td> </tr>"; } echo "</table>"; ?>