Advertisement
Guest User

CSS U JJ

a guest
Jan 22nd, 2020
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.23 KB | None | 0 0
  1. body{
  2. font-style: Georgia;
  3. }
  4. #bm,#l{
  5. background-color:#63AC74;
  6. color: Orange;
  7. height: 140px;
  8. width:50%;
  9. text-align: right;
  10. font-size:160%;
  11. float:left;
  12. }
  13. #g{
  14. background-color:#E3F6E7;
  15. height:500px;
  16. padding:20px;
  17. width:99%;
  18. float:left;
  19. }
  20. #s1,#s2,#s3,#s4{
  21. background-color:#63AC74;
  22. height:150px;
  23. width:25%;
  24. float: left;
  25. }
  26. a{
  27. color: Orange;
  28. padding:15px;
  29. }
  30. table{
  31. background-color: #63AC74;
  32. border: 2px solid green;
  33. width: 100%;
  34. }
  35. th{
  36. background-color:#63AC74;
  37. color: black;
  38. }
  39. #ee{
  40. text-align: right;
  41. }
  42.  
  43. <!doctype html>
  44. <html lang="pl">
  45. <head>
  46. <title>Index.php</title>
  47. <link rel="stylesheet" href="style8.css">
  48. <head>
  49. <body>
  50. <section id="bm">
  51. <a href="index.php">Główna</a>
  52. <a href="procesory.html">Procesory</a>
  53. <a href="ram.html">RAM</a>
  54. <a href="grafika.html">Grafika</a>
  55. </section>
  56. <section id="l"><h2>Podzespoły komputerowe</h2></section><br>
  57. <section id="g"><h1>Dzisiejsze promocje</h1>
  58. <table frame="none">
  59. <tr><th>Numer</th><th>Nazwa podzespołu</th><th>Opis</th><th id="ee">Cena</th></tr>
  60. <?php
  61. $servername = "localhost";
  62. $username = "root";
  63. $password = "";
  64. $dbname = "baza i scalak";
  65. $conn = new mysqli($servername, $username, $password, $dbname);
  66. if ($conn->connect_error) {
  67. die("Connection failed: " . $conn->connect_error);
  68. }
  69. $sql = "SELECT id, nazwa, opis, cena FROM podzespoly";
  70. $result = $conn->query($sql);
  71. if ($result->num_rows > 0) {
  72. while($row = $result->fetch_assoc()) {
  73. echo "<tr style='background-color: #E3F6E7'><th style='background-color: #E3F6E7'>" . $row["id"]. "</th><th style='background-color: #E3F6E7'/>" . $row["nazwa"]. "</th>
  74. <th style='background-color: #E3F6E7'/>" . $row["opis"]. "</th><th id='ee' style='background-color: #E3F6E7'/>" . $row["cena"]. "</th></tr>" ;
  75. }
  76. } else {
  77. echo "0 results";
  78. }
  79. $conn->close();
  80. ?>
  81. </table>
  82. </section><br>
  83. <section id="s1"><img src="scalak.jpg" alt="promocje na procesory"></section>
  84. <section id="s2"><h4>Nasz sklep komputerowy</h4>
  85. <p>Współpracujemy z hurtownią <a href="http://www.edata.pl" target="blank">edata</a></p>
  86. </section>
  87. <section id="s3"><p>zadzwoń: 601 602 603</p></section>
  88. <section id="s4"><p>strone wykonał: PESEL</p></section>
  89. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement