Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
- <title>Dom wczasowy</title>
- <link rel="Stylesheet" type="text/css" href="style.css"/>
- <style type="text/css">
- h1 {
- color: white;
- margin:0;
- padding:0;
- font-size: 65px;
- font-weight:normal;
- }
- body {
- background-image: url(dom.jpg);
- width: 100%;
- height: 100%;
- overflow:hidden;
- background-attachment: scroll;
- width: 100%;
- height: 100%;
- left: 0px;
- top: 0px;
- position: absolute;
- z-index: 0;
- background-size:100%;}
- td{
- color: #000000;
- font-weight: bolder;
- border: 3px solid white;
- border-collapse: collapse;
- background-color: #fff9fb;
- padding: 5px;
- }
- </style>
- </head>
- <body>
- </div>
- <h1><font color="white">Tabela klienci</font></h1>
- <?php
- $servername = "localhost";
- $username = "root";
- $password = "";
- $dbname = "db_name";
- // Create connection
- $conn = new mysqli($servername, $username, $password, $dbname);
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- $sql = "SELECT id_klienta, imie, nazwisko, telefon, E_mail FROM klienci where imie='". $_POST['imie']. "' AND nazwisko='". _POST['nazwisko'].";";
- ?>
- <table border="2"align="center">
- <thead>
- <tr>
- <th><font color="white">ID Klienta</font></th>
- <th><font color="white">Imie</font></th>
- <th><font color="white">Nazwisko</font></th>
- <th><font color="white">Telefon</font></th>
- <th><font color="white">E-Mail</font></th>
- </tr>
- </thead>
- <tbody>
- <?php
- $result = $conn->query($sql);
- if ($result->num_rows == 0) {
- echo '<tr><td colspan="4">No Rows Returned</td></tr>';}
- else {
- $row = $result->fetch_assoc();
- // echo "<tr><td>{$row['id_klienta']}</td><td>{$row['imie']}</td><td>{$row['nazwisko']}</td><td>{$row['telefon']}</td><td>{$row['E_mail']}</td></tr>\n";
- echo "id: " .$row['id_klienta'];
- echo "imie: " .$row['imie'];
- echo "nazwisko: " .$row['nazwisko'];
- echo "telefon: " .$row['telefon'];
- echo "E-mail: " .$row['E_mail'];
- }
- $conn->close();
- ?>
- </tbody>
- </table>
- <div style="position: absolute; bottom: 0px; font-size: 22px;"><font color="white">Copyright Marcin Hus DJ_NIEM 2016 ®</div></font>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement