Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $server = "localhost";
- $user = "root";
- $password = "*";
- $nama_database = "web";
- $db = mysql_connect ($server, $user, $password);
- if( !$db ){
- die("Gagal terhubung dengan database: " . mysqli_connect_error());
- }
- if (!mysql_select_db("web")) {
- echo "Unable to select mydbname: " . mysql_error();
- exit;
- }
- ?>
- <!DOCTYPE html>
- <html lang="zxx">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <style>
- * {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- font-family: 'poppins' , sans-serif;
- }
- body {
- background: #f0f0f0;
- display: flex;
- justify-content: center;
- align-items: center;
- min-height: 100vh;
- font-family: 'poppins' , sans-serif;
- }
- .box {
- width: 300px;
- }
- .box h2 {
- text-align:center;
- background: #f40303;
- color: #fff;
- padding: 20px 10px;
- font-size: 20px;
- font-weight: 700;
- border-top-left-radius:10px;
- border-top-right-radius:10px;
- }
- .box ul {
- position: relative;
- background: #eee;
- }
- .box ul:hover li {
- opacity: 0.2;
- }
- .box ul li {
- list-style: none;
- padding:20px;
- width:100%;
- background: #eee;
- box-shadow:0 5px 25px rgba(0,0,0,0.1);
- transition: transform 0.5s;
- }
- .box ul li:hover {
- transform: scale(1.1);
- z-index:100;
- opacity: 1;
- background: #f40303;
- box-shadow:0 5px 25px rgba(0,0,0,0.2);
- }
- .box ul li span {
- width:20px;
- height:20px;
- text-align:center;
- line-height:20px;
- background:#f40303;
- color:#fff;
- display: inline-block;
- border-radius:30px;
- margin-right:10px;
- font-size: 14px;
- font-weight: 700;
- transform:translateY(-2px)
- }
- .box ul li:hover span {
- background:#fff;
- color:#f40303;
- }
- </style>
- <title>MTA:SA Community</title> <!-- tittle -->
- </head>
- <body>
- <div class="box">
- <h2>Server Update</h2>
- <ul>
- <?php
- $sql = "SELECT * FROM `update` ";
- $result = mysql_query($sql);
- if ( $result ) {
- while ($row = mysql_fetch_assoc($result)) {
- echo ' <li class="col"> <span>'. $row["id"] .'</span> '.$row["update"]. '</li>';
- echo ' <li class="col"> <span>'. $row["id"] .'</span> '.$row["update"]. '</li>';
- }
- }
- ?>
- </ul>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement