-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex2.php
60 lines (49 loc) · 1.69 KB
/
index2.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
session_start();
if(isset($_GET['email'])){
$_SESSION['email']= $_GET['email'];
}
else{
header('location: login.php');
}
?>
<html>
<head></head>
<body>
<input type="email" name="email" value="<?php echo $_GET['email']?>"/>
</body>
</html>
<?php
$conn = new mysqli("localhost", "root","","project");
if($conn->connect_error){
die("connection error");
}
$email = $_GET['email'];
$account_query = "select * from details where email='$email'";
$account_view = $conn ->query($account_query);
echo "<table>";
while ($row = $account_view->fetch_assoc()){
echo"<tr>";
echo "<td style='border: 1px solid black;'>"."First Name       ".$row['fname']."</td>";
echo"</tr>";
echo"<tr>";
echo "<td style='border: 1px solid black;'>"."Last Name       ".$row['lname']."</td>";
echo"</tr>";
echo"<tr>";
echo "<td style='border: 1px solid black;'>"."Phone No.        ".$row['ph_no']."</td>";
echo"</tr>";
echo"<tr>";
echo "<td style='border: 1px solid black;'>"."Email               ".$row['email']."</td>";
echo"</tr>";
echo"<tr>";
echo "<td style='border: 1px solid black;'>"."Password         ".$row['password']."</td>";
echo"</tr>";
echo"<tr>";
echo "<td style='border: 1px solid black;'>"."Address            ".$row['address']."</td>";
echo"</tr>";
echo"<tr>";
echo "<td style='border: 1px solid black;'>"."Date of Birth    ".$row['DOB']."</td>";
echo"</tr>";
}
echo "</table>";
?>