-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconnect.php
31 lines (27 loc) · 916 Bytes
/
connect.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php error_reporting(0);session_start();
if (!isset($_GET['id']) && empty($_GET['id'])) { ?>
<!DOCTYPE html>
<html lang="en">
<?php include 'head.php'; ?>
<body>
<div class="container">
<h1>OOPS!</h1><br> <h3>Please go <a href="index2.php">here</a> first</h3>
</div>
</body>
</html>
<?php }
else {
$unqid = $_SESSION["uid"];
$cryptid = $_SESSION["cid"];
$conn = new mysqli("localhost", "root", "T22051@gmandi", "u978805288_PEDV2");
$conn = mysqli_connect("localhost", "root", "T22051@gmandi", "u978805288_PEDV2");
if ($conn->connect_error) {
echo "<br><a href='index2.php'>Please try again</a> ";die("Connection failed!");
}
echo "Connected successfully"; $_SESSION["connect"]=true;
//header('Location: http://pratik.acslab.org/demographic.php?id='.$cryptid.'&connect=true');
header('Location: ./demographic.php?id='.$cryptid.'&connect=true');
mysqli_close($conn);
die();
}
?>