this img contain my updation.php code
this img contain my updation.php code
when i insert data into textbox and then click submit but at that time
javascript alertbox sys "your data has been updated successfully" and than browser display errorss messeges
<?php
$con = mysqli_connect('127.0.0.1','root','','');
mysqli_select_db($con,'brm_db');
$q = "SELECT * FROM book";
$result = mysqli_query($con,$q);
$num = mysqli_num_rows($result);
mysqli_close($con);
?>
<!DOCTYPE html>
<html>
<head>
<title> Update Record </title>
<link rel="stylesheet" href="./css/viewstyle.css" />
</head>
<body>
<h1 align="center"> Book Record Management</h1>
<center>
<form action="updation.php" method="post">
<table id="view_table">
<tr>
<th>Book Id</th>
<th>Title</th>
<th>Price</th>
<th>Author</th>
</tr>
<?php
for($i=1;$i<=$num;$i++)
{
$row = mysqli_fetch_array($result);
?>
<tr>
<td> <?php echo $row['bookid'];?>
<input type="hidden" name="bookid <?php echo $i ;?>" value="<?php echo $row['bookid'];?>" /> </td>
<td><input type="text" name="title <?php echo $i ;?> "value="<?php echo $row['title'];?>" /></td>
<td><input type="text" name="price <?php echo $i ;?> "value="<?php echo $row['price'];?>" /></td>
<td><input type="text" name="author <?php echo $i ;?> "value="<?php echo $row['author'];?>" /></td>
</tr>
<?php
}
?>
</table>
<input type="submit" value="Update" style="background-color:lightgreen;width:100px;" />
</form>
</center>
</body>
</html>