· 4 years ago · Jan 30, 2021, 02:10 PM
1<?php session_start();
2include_once 'dateCheck.php';
3ob_start();?>
4<html>
5<head>
6 <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
7 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
8 <title>Sir Syed Global Scholar Award (SSGSA)</title>
9 <link rel="stylesheet" href="css/bootstrap.min.css">
10 <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">
11 <script src="js/bootstrap.min.js"></script>
12 <link rel="shortcut icon" type="image/png" href="images/favicon.png"/>
13 <link rel="stylesheet" href="css/style_testimonials.css" />
14 <link rel="stylesheet" href="css/sticky-footer.css">
15</head>
16<style type="text/css">
17 .this-form{
18 /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#000000+0,dbdbdb+100&0+8,0+8,0.65+100 */
19 background: -moz-linear-gradient(left, rgba(0,0,0,0) 0%, rgba(18,18,18,0) 8%, rgba(219,219,219,0.65) 100%); /* FF3.6-15 */
20 background: -webkit-linear-gradient(left, rgba(0,0,0,0) 0%,rgba(18,18,18,0) 8%,rgba(219,219,219,0.65) 100%); /* Chrome10-25,Safari5.1-6 */
21 background: linear-gradient(to right, rgba(0,0,0,0) 0%,rgba(18,18,18,0) 8%,rgba(219,219,219,0.65) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
22 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#a6dbdbdb',GradientType=1 ); /* IE6-9 */
23
24 border-radius:10px;
25 padding-left:50px;
26 padding-right:50px;
27 border-right: 1px solid #edd;
28 box-shadow: 0px 2px 5px #fff;
29 padding:40px 20px 0px 20px;
30 }
31 .contents{
32 background-color: #f9f9f9;
33 -webkit-box-shadow: 0px 0px 9px 3px rgba(0,0,0,0.44);
34 -moz-box-shadow: 0px 0px 9px 3px rgba(0,0,0,0.44);
35 box-shadow: 0px 0px 9px 3px rgba(0,0,0,0.44);
36 margin-bottom:100px;
37 }
38</style>
39<body>
40<?php include_once 'navbar.php'; ?>
41<!------------------------------------------------------------------------------------------------->
42
43<div class="container contents">
44
45 <?php
46 include_once 'db_config.php';
47 // Create connection
48 $connection = new mysqli($servername, $username, $password, $dbname);
49
50
51
52 $email="sanjana.maheshwari456@gmail.com";
53 $pwd="Sanjana1!";
54 $pwd=md5($pwd);
55 // Check connection
56 $sql = "SELECT name FROM reg where email=? and pwd=?";
57
58 $result = $connection->query($sql);
59 if($stmt = $connection->prepare($sql)) {
60 $stmt->bind_param("ss",$email,$pwd);
61 if ($stmt->execute()){
62 echo "stmt executed";
63 }else{
64 echo "stmt not exe";
65 }
66 }
67 if ($result->num_rows == 0)
68 {
69 $sql = "SELECT * FROM reg_temp where email='$email' and pwd='$pwd'"; //Check if user exists in the temporary table, means he has not verified his account
70 $result = $connection->query($sql);
71 if ($result->num_rows > 0)
72 {
73 echo "Zero rows";
74 }
75 echo "Sorry, Incorrect Login".mysqli_error($connection);
76
77 }
78 //Now, following codes will execute in case of successful login
79 else $data=$result->fetch_assoc();
80 $name=$data['name'];
81 $_SESSION["st_name"]=$name;
82 $_SESSION["email"]=$email;
83
84 $connection->close();
85 //header("Location:apply.php?type=login");
86 echo "successfull login";
87 ?>
88 <?php
89 echo "Running" ?>
90
91
92
93</div>
94<!---------------------------------------------->
95</body>