-
Notifications
You must be signed in to change notification settings - Fork 0
/
Scientist.php
67 lines (58 loc) · 1.72 KB
/
Scientist.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
61
62
63
64
65
66
67
<!DOCTYPE html>
<html lang="en">
<head>
<?php
//Turn off
error_reporting(0);
include "Head.php";
?>
</head>
<body>
<?php
//Turn off
error_reporting(0);
include "SHeader.php";
?>
<br/>
<div class="container" align="center">
<div class="row">
<div class="contact2-caption clearfix">
<div class="contact2-heading text-center">
<?php
session_start();
if(!(isset($_SESSION['SFname'])) )
header("Location:ScientistLogin.php");
$fn=$_SESSION["SFname"];
$ln=$_SESSION["SLname"];
echo "<h2>WELCOME - $fn $ln</h2>";
?>
</div>
<div class="col-md-6 col-md-offset-1 contact2-form">
<?php
include "connect.php";
$query = "SELECT * from scientist where Fname='$fn' and Lname='$ln'";
$result = mysqli_query($mysqli, $query);
while($row = $result->fetch_array(MYSQLI_ASSOC))
{
$a =$row['Fname'];
$b =$row['Lname'];
$c =$row['Password'];
$id =$row['Usernameorid'];
echo <<<abc
<img src="getImage2.php?Usernameorid=$id" width="400" height="475" />
<form class="form" method="post" action="Save.php" enctype="multipart/form-data">
<input type="text" placeholder="Usernameorid" name="Usernameorid" value=$id required>
<input type="text" placeholder="First Name" name="Fname" value=$a required>
<input type="text" placeholder="Last Name" name="Lname" value=$b required>
<input type="password" placeholder="Change Password" name="Password" required>
<input class="submit-btn" type="submit" value="UPDATE">
</form>
abc;
}
?>
</div>
</div>
</div>
</div>
</body>
</html>