-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate_data.php
More file actions
49 lines (43 loc) · 1.61 KB
/
update_data.php
File metadata and controls
49 lines (43 loc) · 1.61 KB
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
<?php include("dbcon.php");
$Id=$_GET['Id'];
$query="SELECT * FROM user2 WHERE Id='$Id'";
$data=mysqli_query($conn,$query);
$total=mysqli_num_rows($data);
$result=mysqli_fetch_assoc($data);
?>
<html>
<head>
<title>Update form</title>
<link rel="stylesheet" type="text/css" href="./style4.css">
</head>
<body>
<div class="Registeration-form">
<h1>Update form</h1>
<form action="update_info.php" method="post">
<p>Firstname</p>
<input type="text" value="<?php echo $result['Firstname'];?>"name="Firstname" placeholder="Enter Firstname" required>
<p>Lastname</p>
<input type="text"value="<?php echo $result['Lastname'];?> "name="Lastname" placeholder="Enter Lastname"required>
<p>Email</p>
<input type="Email"value="<?php echo $result['Email'];?>" name="Email" pattern="[^ @]*@[^ @]*" placeholder="Enter Email"required>
<p>Phone number</p>
<input type="number"value="<?php echo $result['Phone'];?>" name="Phone" placeholder="Please enter Phone number">
<p>Password</p>
<input type="Password" value="<?php echo $result['Password'];?>"name="Password" placeholder="Enter Password"required>
<p>Date of birth</p>
<input type="Date"value="<?php echo $result['DOB'];?>" name="DOB" placeholder="Enter DOB">
<p>Bio</p>
<input type="text"value="<?php echo $result['Bio'];?>" name="Bio" placeholder="Please enter bio">
<a href="display.php">
<button onclick="message()"type="submit">Update </button>
</a>
<button type="reset">Reset</button>
</a>
</form>
</div>
<!-- <script >funcation message(){
alert ("upload");
}
</script> -->
</body>
</html>