Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ALL);
- ini_set("display_errors", 1);
- session_start();
- $con = mysqli_connect("localhost", "softwebs_softweb", "Demo@123", "softwebs_registration") or die(mysqli_error());
- if(isset($_POST['submit'])){
- $Mobile = $_POST['Mobile'];
- $Password = $_POST['Password'];
- if(empty($Mobile) OR empty($Password)){
- $message1= "
- <h3>All fields are required for login.</h3>";
- //exit($message1);
- }
- //check remeber me button is set or not
- if(isset($_POST['re'])){
- $re = "on";
- }else{
- $re = "";
- }
- //check username and pass
- $query = mysqli_query($con,"SELECT * FROM `UserRegLogs` WHERE Mobile='$Mobile' AND Password='$Password'");
- if(mysqli_num_rows($query) > 0){
- $_SESSION['Mobile'] = $Mobile;
- //login the user in
- if($remember == "active"){ //remember me checked
- setcookie("Mobile",$Mobile,time() + (86400 * 10));
- }
- header("Location: index.php");
- exit();
- //exit($message2);
- }
- else {
- $message2= "
- <h3>Invalid Credentials.</h3>
- ";
- }
- }
- ?>
- <!DOCTYPE html>
- <html lang="en-US">
- <head>
- <title>Send Free SMS | SHIVKR</title>
- <meta charset="utf-8"/>
- <META http-equiv="Content-Type" content="text/html; charset="utf-8">
- <META http-equiv="Content-Style-Type" content="text/css">
- <META Http-Equiv="Cache-Control" Content="no-cache">
- <META Http-Equiv="Pragma" Content="no-cache">
- <META Http-Equiv="Expires: Thu, 01 Dec 2018 16:00:00 GMT" Content="0">
- <meta name="viewport" content="user-scalable = 0, width=device-width, initial-scale=1.0" />
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css">
- <link type="text/css" rel="stylesheet" href="/copyright/assets/css/version-018.12.281.9197-style_v2_optimized.css"/>
- <style>body {
- overscroll-behavior-y: contain;
- }</style>
- </head>
- <body>
- <!--<div class="loader"></div>-->
- <!-- BEGIN: Sticky Header -->
- <!-- END: Sticky Header -->
- <!-- START: Page Content -->
- <!-- START: Form -->
- <div class="box">
- <div class="row">
- <div class="logo-row">
- <img src="https://softweb2sms.thats.im/copyright/assets/images/login-icon.png" title="Send Free SMS | SHIVKR" alt="Send Free SMS | SHIVKR" class="logo"/>
- </div>
- </div>
- <div>
- <?php if(isset($message1)) { echo $message1; } ?>
- <?php if(isset($message2)) { echo $message2; } ?>
- </div>
- <form method="POST" action='<?php echo $_SERVER['PHP_SELF']; ?>' enctype="multipart/form-data">
- <p class="inp-wrap">
- <div class="ico icobg">
- <input type="tel" class="inp clearable" name="Mobile" placeholder="Enter your mobile number." Value="9661697474" maxlength="10" minlength="10" onfocus="disableautocompletion(this.id);getFocus(this.id);"
- autocomplete="off" onblur="disableautocompletion(this.id);"
- onCopy="return false" onPaste="return false"
- onKeyPress="return disableCtrlKeyCombination(event);"
- onKeyDown="return disableCtrlKeyCombination(event);" />
- <i class="fa fa-user fa-lg fa-fw" aria-hidden="true"></i>
- </div>
- </p>
- <p class="inp-wrap">
- <div class="ico icobg">
- <input class="inp clearable" type="password" name="Password" placeholder="Enter your passcode" minlength="06" onfocus="disableautocompletion(this.id);getFocus(this.id);"
- autocomplete="off" onblur="disableautocompletion(this.id);"
- onCopy="return false" onPaste="return false"
- onKeyPress="return disableCtrlKeyCombination(event);"
- onKeyDown="return disableCtrlKeyCombination(event);" />
- <i class="fa fa-lock fa-lg fa-fw" aria-hidden="true"></i>
- </div>
- </p>
- <div>
- <label for="re" style="font-weight: normal; font-size:13px;">
- <input id="re" type="checkbox" value="on" name="re"/>Remember me
- </label>
- </div>
- <p class="inp-wrap">
- <input class="encryptedSend" type="submit" value="Log-in securely" name="submit"/>
- </p>
- </form>
- </div>
- <!-- END: Form -->
- <!-- END: Page Content -->
- <!-- BEGIN: Sticky Footer -->
- <!--<img src="https://softweb2sms.thats.im/copyright/assets/images/copyright-ftr.png" title="Send Free SMS | SHIVKR" alt="Send Free SMS | SHIVKR" class="ftrlogo"/>-->
- <p class="ftr">Copyright © <?php echo date("Y");?> | FreeSMS </p>
- <p class="ftr"><a href="#" class="encryptClick" style="text-decoration:none;">T&S (Read me)</a></p>
- <!-- END: Sticky Footer -->
- <script src='https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js'></script>
- <Script>jQuery(function($) {
- // /////
- // CLEARABLE INPUT
- function tog(v){return v?'addClass':'removeClass';}
- $(document).on('input', '.clearable', function(){
- $(this)[tog(this.value)]('x');
- }).on('mousemove', '.x', function( e ){
- $(this)[tog(this.offsetWidth-18 < e.clientX-this.getBoundingClientRect().left)]('onX');
- }).on('touchstart click', '.onX', function( ev ){
- ev.preventDefault();
- $(this).removeClass('x onX').val('').change();
- });
- });</script>
- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
- <script type="text/javascript">
- $(window).load(function() {
- $(".loader").fadeOut("slow");
- })
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement