Hi I am new for php and i try to fetch the value from db and some fields like to hidden value i try this but its not working need help…
<?php
include ("server.php");
if (isset($_GET['edit'])) {
$id = $_GET['edit'];
$update = true;
$record = mysqli_query($db, "SELECT * FROM info WHERE id=$id");
if (count($record) == 1 ) {
$n = mysqli_fetch_array($record);
$name = $n['name'];
$address = $n['address'];
$move_1 = $n['move_1'];
}
}
?>
<html>
<title>form</title>
<body>
<form method="post" action="view_records.php" >
<div class="input-group">
<label>Loan Grant</label>
<input type="hidden" name="name" value="<?php echo $name; ?>">
</div>
<div class="input-group">
<label>Recommendation</label>
<select name="move_1">
<option value="">Select any one</option>
<option value="Recommended">Recommended</option>
<option value="Not Recommended">Not Recommended</option>
</select>
</div>
<body>
<html>