Advertisement
Guest User

HT 5 ML PHP CSS

a guest
Aug 19th, 2019
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.13 KB | None | 0 0
  1. <?php
  2. $server = "localhost";
  3. $user = "root";
  4. $password = "*";
  5. $nama_database = "web";
  6. $db = mysql_connect ($server, $user, $password);
  7. if( !$db ){
  8.     die("Gagal terhubung dengan database: " . mysqli_connect_error());
  9. }
  10.  
  11. if (!mysql_select_db("web")) {
  12.     echo "Unable to select mydbname: " . mysql_error();
  13.     exit;
  14. }
  15.  
  16. ?>
  17. <!DOCTYPE html>
  18. <html lang="zxx">
  19.  
  20. <head>
  21.     <meta charset="utf-8">
  22.     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  23.     <style>
  24.         * {
  25.             margin: 0;
  26.             padding: 0;
  27.             box-sizing: border-box;
  28.             font-family: 'poppins' , sans-serif;
  29.         }
  30.         body {
  31.             background: #f0f0f0;
  32.             display: flex;
  33.             justify-content: center;
  34.             align-items: center;
  35.             min-height: 100vh;
  36.             font-family: 'poppins' , sans-serif;
  37.         }
  38.         .box {
  39.             width: 300px;
  40.         }
  41.         .box h2 {
  42.             text-align:center;
  43.             background: #f40303;
  44.             color: #fff;
  45.             padding: 20px 10px;
  46.             font-size: 20px;
  47.             font-weight: 700;
  48.             border-top-left-radius:10px;
  49.             border-top-right-radius:10px;
  50.         }
  51.         .box  ul {
  52.             position: relative;
  53.             background: #eee;
  54.         }
  55.         .box ul:hover li {
  56.             opacity: 0.2;
  57.         }
  58.         .box ul li {
  59.             list-style: none;
  60.             padding:20px;
  61.             width:100%;
  62.             background: #eee;
  63.             box-shadow:0 5px 25px rgba(0,0,0,0.1);
  64.             transition: transform 0.5s;
  65.         }
  66.         .box ul li:hover {
  67.             transform: scale(1.1);
  68.             z-index:100;
  69.             opacity: 1;
  70.             background: #f40303;
  71.             box-shadow:0 5px 25px rgba(0,0,0,0.2);
  72.         }
  73.         .box ul li span {
  74.             width:20px;
  75.             height:20px;
  76.             text-align:center;
  77.             line-height:20px;
  78.             background:#f40303;
  79.             color:#fff;
  80.             display: inline-block;
  81.             border-radius:30px;
  82.             margin-right:10px;
  83.             font-size: 14px;
  84.             font-weight: 700;
  85.             transform:translateY(-2px)
  86.         }
  87.         .box ul li:hover span {
  88.             background:#fff;
  89.             color:#f40303;
  90.         }
  91.     </style>
  92.  
  93.     <title>MTA:SA Community</title> <!-- tittle -->
  94. </head>
  95.         <body>
  96.             <div class="box">
  97.                 <h2>Server Update</h2>
  98.                 <ul>
  99.                 <?php
  100.                
  101.                 $sql = "SELECT *  FROM  `update` ";
  102.            
  103.                 $result = mysql_query($sql);
  104.                 if ( $result ) {
  105.                     while ($row = mysql_fetch_assoc($result)) {
  106.                         echo ' <li class="col"> <span>'. $row["id"] .'</span> '.$row["update"]. '</li>';
  107.                         echo ' <li class="col"> <span>'. $row["id"] .'</span> '.$row["update"]. '</li>';
  108.                     }
  109.                 }
  110.                 ?>
  111.                    
  112.                 </ul>
  113.             </div>
  114.         </body>
  115. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement