-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate_db.php
More file actions
28 lines (27 loc) · 931 Bytes
/
Copy pathupdate_db.php
File metadata and controls
28 lines (27 loc) · 931 Bytes
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
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "abes";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$name=$_POST["name"];
$mob=$_POST["phone"];
$gen=$_POST["gend"];
$dep=$_POST["dep"];
$emp=$_POST["emp"];
$int=$_POST["in_time"];
$out=$_POST["out_time"];
$date=$_POST["date"];
if(isset($_POST['submit'])){
$sql="UPDATE enquiry set name='".$name."',Contact= '".$mob."',gender='".$gen."',
department='".$dep."',emp_name='".$emp."',in_time='".$int."',out_time='".$out."',date='".$date."' where contact='$mob' ";
if(mysqli_query($conn,$sql))
{
$msg="Record updated successfully";
echo $msg;
}
}
?>