BossBey File Manager
PHP:
8.4.18
OS:
Linux
User:
kids
Root
/
home
/
kids
/
public_html
/
bacma
/
leads
📤 Upload
📝 New File
📁 New Folder
Close
Editing: leads.php
<!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Special Sports Kids</title> <meta name="description" content=""> <meta name="author" content=""> <link href="css/bootstrap.min.css" rel="stylesheet"> <link href="css/style.css" rel="stylesheet"> </head> <body> <div class="container"> <?php $host = 'localhost'; $db = 'kids_site'; $user = 'kids_admin'; $pass = 'Criativa*2023'; $sgbd = 'mysql'; // pgsql, mysql $opt = [ PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, PDO::ATTR_EMULATE_PREPARES => false, PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\'', ]; try { $pdo = new PDO("$sgbd:host=$host;dbname=$db", $user, $pass, $opt); } catch(PDOException $e) { echo "Erro de conexão com o banco de dados: " . $e->getMessage(); } $sql = "SELECT leads.* FROM leads"; $result = $pdo->query($sql); if ($result->rowCount() > 0) { echo '<table class="table table-responsive table-hover table-bordered table-striped">'; echo "<thead>"; echo "<tr>"; echo "<th>ID</th>"; echo "<th>NOME</th>"; echo "<th>EMAIL</th>"; echo "<th>TELEFONE</th>"; echo "</tr>"; echo "</thead>"; echo "<tbody>"; while ($row = $result->fetch()) { echo "<tr>"; echo "<td>" . $row['id'] . "</td>"; echo "<td>" . $row['nome'] . "</td>"; echo "<td>" . $row['email'] . "</td>"; echo "<td><a href='https://api.whatsapp.com/send?phone=55" . $row['telefone'] . "' target='_blank'>" . $row['telefone'] . "</a></td>"; echo "</tr>"; } echo "</tbody>"; echo "</table>"; } else { echo "Nenhum resultado encontrado."; } ?> </div> </body> </html>
Save
Cancel