D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
shubmkcj
/
designpitara.com
/
dash
/
Filename :
index.php
back
Copy
<?php session_start(); include 'config.php'; if($_SESSION['design1'] != ''){ echo "<script>location.replace('dashboard.php')</script>"; } ?> <!DOCTYPE html> <html lang="zxx"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="description" content=""> <meta name="author" content="designpitara"> <meta name="robots" content="index,follow"/> <link rel="icon" href="assets/img/basic/favicon.ico" type="image/x-icon"> <title>Login | Email Campaing</title> <!-- CSS --> <link rel="stylesheet" href="assets/css/app.css"> </head> <body class="light"> <div id="app"> <div class="container-fluid my-3"> <div class="d-flex row"> <div class="col-md-8 m-auto"> <!-- Basic Validation --> <div class="card mb-3 shadow no-b r-0"> <div class="card-header white"> </div> <div class="card-body"> <form method="post" class="needs-validation"> <div class="form-group"> <label>Email</label> <input type="email" class="form-control" name="email" placeholder="Enter Your Email"> </div> <div class="form-group"> <label>Password</label> <input type="password" class="form-control" name="password" placeholder="Enter Your Password"> </div> <button class="btn btn-primary" name="submit" type="submit">Submit form</button> </form> </div> </div> <!-- #END# Basic Validation --> </div> </div> </div> </div> <!--/#app --> <script src="assets/js/app.js"></script> </body> </html> <?php if(isset($_POST['submit'])){ $email= $_POST['email']; $password= $_POST['password']; $stmt = $conn->prepare("SELECT email FROM user WHERE email=? AND password=?"); $stmt->bind_param("ss", $email, $password); $stmt->execute(); $stmt->store_result(); if($stmt->num_rows == 1){ $stmt->bind_result($adminemail); while($stmt->fetch()) { $_SESSION['design1'] = $adminemail; echo '<script>location.replace("dashboard.php")</script>'; } }else{ echo '<script>alert("Invalid UserName / Password")</script>'; } $stmt->close(); } ?>