-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodifydate.php
More file actions
40 lines (38 loc) · 1.65 KB
/
Copy pathmodifydate.php
File metadata and controls
40 lines (38 loc) · 1.65 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
<html>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<body>
<?php
session_start();
$id = $_GET['id'];
$conn = mysqli_connect("localhost", "root", "root", "contactmanager");
if(!$conn){
echo "Database connection failed";
}
else
{
$sql = "SELECT * FROM date WHERE date_id =$id";
$result = mysqli_query($conn,$sql);
if (mysqli_num_rows($result) > 0) {
// output data of each row
while($row = mysqli_fetch_assoc($result)) {
// echo "hi";
echo '<div id= "Dateform">
<form class="form-horizontal" action="updatecontact.php" method="GET">
<div>
<h3>Date Details:</h3>
<input type="hidden" name="type" value="date">
<input type="hidden" name="id" value="'.$id.'">
<label for="Datetype">Date Type:</label>
<input type="text" id="Datetype" name="Datetype" value="'.$row["Date_type"].'">
<label for="date">Date(YYYY-MM-DD):</label>
<input type="text" id="date" name="date" value="'.$row["date"].'">
</div>
<input type="submit" value="Update">  <button><a href="contactIndex.php">Home</a></button>
</form>
</div>';
}
}
}
?>
</body>
</html>