1
2<?php
3session_start();
4if(isset($_POST['save']))
5{
6 extract($_POST);
7 include 'database.php';
8 $sql=mysqli_query($conn,"SELECT * FROM register where Email='$email' and Password='md5($pass)'");
9 $row = mysqli_fetch_array($sql);
10 if(is_array($row))
11 {
12 $_SESSION["ID"] = $row['ID'];
13 $_SESSION["Email"]=$row['Email'];
14 $_SESSION["First_Name"]=$row['First_Name'];
15 $_SESSION["Last_Name"]=$row['Last_Name'];
16 header("Location: home.php");
17 }
18 else
19 {
20 echo "Invalid Email ID/Password";
21 }
22}
23?>
24
25