Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- get_include_path("inc/koneksi.php")
- ?>
- <html>
- <head>
- <title> GameCloud.com </title>
- <style type="text/css">
- #utama
- {
- width : 300px;
- margin : 0 auto;
- margin-top : 300;
- }
- #judul
- {
- padding: 10px ;
- text-align : center;
- color : #ffffff;
- font-size : 22px;
- background-color : #034766;
- border-top-right-radius : 20px;
- border-top-left-radius : 20px;
- }
- #inputan
- {
- background-color : #00ff00;
- padding : 15px;
- border-bottom-right-radius : 20px;
- border-bottom-left-radius : 20px;
- }
- input
- {
- padding : 10px;
- border : 0;
- background-color: #00fffc;
- }
- .lg
- {
- width : 260px;
- }
- .btn
- {
- background-color: #00ff00;
- border-radius : 10px;
- color : #000000;
- margin-bottom : 20px
- margin-top : -40;
- }
- .btn:hover
- {
- background-color : #034766;
- cursor : pointer;
- }
- .btn2
- {
- background-color: #00ff00;
- border-radius : 10px;
- color : #000000;
- margin-left: 225;
- margin-top : -70;
- }
- .btn2:hover
- {
- background-color : #034766;
- cursor : pointer;
- }
- .pass
- {
- background-color: #00ff00;
- border-radius : 10px;
- color : #000000;
- margin-top : -6;
- margin-left : 62;
- }
- .pass:hover
- {
- background-color : #034766;
- cursor : pointer;
- }
- </style>
- </head>
- <body background="loginbackground.jpg">
- <div id="utama">
- <div id="judul">
- login
- </div>
- <div id="inputan";>
- <form action="" method="post">
- <div>
- <input type="text" name="user" placeholder="username" class="lg"/>
- </div>
- <div style="margin-top:10px;">
- <input type="password" name="pass" placeholder="Password" class="lg" />
- </div>
- <div id="remember-container" style="margin-top:20px;">
- <input type="checkbox" id="checkbox-2" class="checkbox" checked="checked"/>
- <span id="remember">Remember me</span>
- </div>
- </div>
- </body>
- <div style="margin-top:19px;">
- <input type="submit" name="signup" value="sign up" class="btn" />
- </div>
- <div style="margin-top:19px;">
- <input type="submit" name="login" value="login" class="btn2" />
- </div>
- </form>
- <?php
- $user = @$_POST['user'];
- $pass = @$_POST['pass'];
- $login= @$_POST['login'];
- if ($login)
- {
- if(empty($user) || empty($pass))
- {
- ?> <script type="text/javascript">alert("username/password tidak boleh kosong euy");</script><?php
- }
- else
- {
- $sql = mysql_query("select * from tb_login where username= '$user' and password = md5('$pass')") or die(mysql_error());
- $cek = mysqli_num_rows($sql);
- echo $cek;
- }
- }
- ?>
- </div>
- </div>
- </body>
- </html>
Add Comment
Please, Sign In to add comment