- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvalidate.php
More file actions
Latest commit
21 lines (17 loc) · 713 Bytes
/
Copy pathvalidate.php
File metadata and controls
21 lines (17 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
// header("Location: dashboard.php");
session_start();
include("dbconnection.php");
if (isset($_POST["userlogin"])) {
$selrec = "SELECT * from registration where uname='" . $_POST['uname'] . "' and password='" . $_POST['password'] . "'";
$selquery = mysqli_query($dbconnection, $selrec);
$sqlfetch = mysqli_fetch_array($selquery);
if (!empty($sqlfetch) && is_array($sqlfetch)) {
$_SESSION['reg_id'] = $sqlfetch['reg_id'];
echo$_SESSION['reg_id'];
//$_SESSION['room_id'] = $_GET['roomid'];
header("location: user/profile.php");
} else {
$msg = "<br><font color='black'><marquee loop=5 ><strong>Login Failed</strong></marquee></font>";
}
}