How to update image ?
Using Code:-
<?php
include_once("database.php");
if(count($_POST)>0)
{
// $sql="UPDATE users SET name='" . $_POST['name'] . "', dateofbirth='" . $_POST['dateofbirth'] . "' ,email='" . $_POST['email'] . "' WHERE userid='" . $_GET['userid'] . "'";
$sql="UPDATE users SET name='" . $_POST['name'] . "' ,email='" . $_POST['email'] . "' WHERE userid='" . $_GET['userid'] . "'";
echo $sql;
exit;
mysqli_query($conn,$sql);
$message = "Record Modified Successfully";
header("location:show.php");
}
$result = mysqli_query($conn,"SELECT * FROM users WHERE userid='" . $_GET['userid'] . "'"); // For Fetch...
$row= mysqli_fetch_array($result);
?>
<html>
<head>
<title>Update Employee Data</title>
</head>
<body>
<form name="frmUser" method="post" action="" style="margin-left:230px;margin-top:85px;" enctype="multipart/form-data">
<div><?php if(isset($message)) { echo $message; } ?>
</div>
<div style="padding-bottom:5px;margin-bottom:20px;">
<a href="show.php">Users List</a>
</div>
Name: <br>
<input type="text" name="name" class="txtField" value="<?php echo $row['name']; ?>">
<br>
<br>
<!-- Date Of Birth :<br>
<input type="date" name="dateofbirth" class="txtField" value=""> -->
<br>
<br>
Email:<br>
<input type="email" name="email" class="txtField" value="<?php echo $row['email']; ?>">
<br>
<br>
<input type="submit" name="submit" value="Update" class="buttom">
</form>
</body>
</html>