Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- body{
- font-style: Georgia;
- }
- #bm,#l{
- background-color:#63AC74;
- color: Orange;
- height: 140px;
- width:50%;
- text-align: right;
- font-size:160%;
- float:left;
- }
- #g{
- background-color:#E3F6E7;
- height:500px;
- padding:20px;
- width:99%;
- float:left;
- }
- #s1,#s2,#s3,#s4{
- background-color:#63AC74;
- height:150px;
- width:25%;
- float: left;
- }
- a{
- color: Orange;
- padding:15px;
- }
- table{
- background-color: #63AC74;
- border: 2px solid green;
- width: 100%;
- }
- th{
- background-color:#63AC74;
- color: black;
- }
- #ee{
- text-align: right;
- }
- <!doctype html>
- <html lang="pl">
- <head>
- <title>Index.php</title>
- <link rel="stylesheet" href="style8.css">
- <head>
- <body>
- <section id="bm">
- <a href="index.php">Główna</a>
- <a href="procesory.html">Procesory</a>
- <a href="ram.html">RAM</a>
- <a href="grafika.html">Grafika</a>
- </section>
- <section id="l"><h2>Podzespoły komputerowe</h2></section><br>
- <section id="g"><h1>Dzisiejsze promocje</h1>
- <table frame="none">
- <tr><th>Numer</th><th>Nazwa podzespołu</th><th>Opis</th><th id="ee">Cena</th></tr>
- <?php
- $servername = "localhost";
- $username = "root";
- $password = "";
- $dbname = "baza i scalak";
- $conn = new mysqli($servername, $username, $password, $dbname);
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- $sql = "SELECT id, nazwa, opis, cena FROM podzespoly";
- $result = $conn->query($sql);
- if ($result->num_rows > 0) {
- while($row = $result->fetch_assoc()) {
- echo "<tr style='background-color: #E3F6E7'><th style='background-color: #E3F6E7'>" . $row["id"]. "</th><th style='background-color: #E3F6E7'/>" . $row["nazwa"]. "</th>
- <th style='background-color: #E3F6E7'/>" . $row["opis"]. "</th><th id='ee' style='background-color: #E3F6E7'/>" . $row["cena"]. "</th></tr>" ;
- }
- } else {
- echo "0 results";
- }
- $conn->close();
- ?>
- </table>
- </section><br>
- <section id="s1"><img src="scalak.jpg" alt="promocje na procesory"></section>
- <section id="s2"><h4>Nasz sklep komputerowy</h4>
- <p>Współpracujemy z hurtownią <a href="http://www.edata.pl" target="blank">edata</a></p>
- </section>
- <section id="s3"><p>zadzwoń: 601 602 603</p></section>
- <section id="s4"><p>strone wykonał: PESEL</p></section>
- </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement