Advertisement
Guest User

Untitled

a guest
Nov 18th, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. <?php
  2.  
  3. global $status;
  4.  
  5. $host = 'localhost';
  6. $user = 'klient1';
  7. $pass = 'fanfilmow';
  8. $db = 'bazadanych';
  9.  
  10. $polaczenie = new mysqli($host,$user,$pass,$db);
  11.  
  12.  
  13.  
  14.  
  15. if($polaczenie->connect_errno > 0){
  16. die('Unable to connect to database [' . $polaczenie->connect_error . ']');
  17. $status = 'false';
  18. }else{
  19.  
  20. $status = 'true';
  21.  
  22. }
  23.  
  24. ?>
  25.  
  26. <!DOCTYPE html>
  27. <html>
  28. <head>
  29. <title>Połączenie z bazą danych</title>
  30. <link rel="stylesheet" href="style.css" type="text/css">
  31. <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
  32. <style>
  33.  
  34. body{
  35.  
  36. text-align: center;
  37. margin:0;
  38. padding:0;
  39. color:red;
  40.  
  41. }
  42.  
  43. li{
  44.  
  45. display:inline-block;
  46. background-color:red;
  47. margin:5px;
  48.  
  49. }
  50.  
  51. a{
  52.  
  53. color:#333333;
  54. margin:5px;
  55. }
  56.  
  57. a:hover{
  58.  
  59. color:red;
  60. margin:5px;
  61.  
  62.  
  63. }
  64.  
  65. li:hover{
  66.  
  67. background-color:#333333;
  68.  
  69. }
  70.  
  71.  
  72.  
  73.  
  74. #box{
  75.  
  76. }
  77.  
  78. #top{
  79.  
  80. background-color:#333333;
  81. height:50px;
  82.  
  83. }
  84.  
  85. #menu{
  86.  
  87. background-color: #333333;
  88. height:50px;
  89.  
  90. }
  91.  
  92. #content{
  93.  
  94. background-color:#333333;
  95. height:350px;
  96. margin-top:5px;
  97. }
  98.  
  99.  
  100.  
  101. #footer{
  102.  
  103. background-color: #333333;
  104. height:50px;
  105. margin-top:5px;
  106. }
  107.  
  108. </style>
  109. </head>
  110. <body>
  111.  
  112. <div id="box">
  113.  
  114. <div id="top">
  115.  
  116. LOGO
  117.  
  118. </div>
  119. <div id="menu">
  120.  
  121. <ul>
  122. <li><a target="_black" href="www.google.com">GOOGLE</a></li>
  123. <li><a target="_black" href="www.facebook.com">FACEBOOK</a></li>
  124. <li><a target="_black" href="www.darkwarez.pl">DARKWAREZ</a></li>
  125. </ul>
  126.  
  127. </div>
  128. <div id="content">
  129. Połączenie z bazą danych: <?php echo $status; ?><br><br><br><BR>
  130.  
  131. <form action='' method='post'>
  132.  
  133. <input type="text" size="200" value="wprowadź zapytanie"/><br>
  134.  
  135. <button type="submit">WYKONAJ ZAPYTANIE</button>
  136. </form>
  137.  
  138.  
  139. </div>
  140. <div id="footer">
  141.  
  142. webmaster &COPY Damian Sieczko
  143.  
  144.  
  145. </div>
  146.  
  147.  
  148. </div>
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159. </body>
  160. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement