New Text Document
New Text Document
>
<div id="main-content">
<h2>Update Record</h2>
while($row= mysqli_fetch_assoc($result)){
?>
<form class="post-form" action="updatedata.php" method="post">
<div class="form-group">
<label>Name</label>
<input type="hidden" name="id" value="<?php echo $row['id'];?>"/>
<input type="text" name="name" value="<?php echo $row['name'];?>"/>
</div>
<div class="form-group">
<label>Address</label>
<input type="text" name="address" value="<?php echo $row['address'];?>"/>
</div>
<div class="form-group">
<label>Designation</label>
<select name="sclass">
<option value="" selected disabled>Select Designation</option>
<?php
$sql1 = "SELECT DISTINCT (designation) from 2312f1_table";
$result1 = mysqli_query($con, $sql1);
if(mysqli_num_rows($result1) > 0){
while($row1 = mysqli_fetch_assoc($result1)){
echo "<option value =
'{$row1['designation']}'>{$row1['designation']}'</option>";
}
}
?>
<option value="Full Stack Developer">Full Stack Developer</option>
<option value="UI/UX Designer">UI/UX Designer</option>
<option value="Graphic Designer">Graphic Designer</option>
</select>
</div>
<div class="form-group">
<label>Phone</label>
<input type="text" name="phone" value="<?php echo $row['phone']; ?>"/>
</div>
<input class="submit" type="submit" value="Update"/>
</form>
<?php
}
}
?>
</div>
</div>
</body>
</html>