Hello all i have some problem with update query. select query works all right but update qurey doesn't i have tried to to run that query in mysql directly from phpmyadmin and it runs fine ... can you check what i m missing here in code in update query and i m a student new to php
<?php session_start();
if(!isset($_SESSION['password'])||!isset($_SESSION['username'])){
header("location:admin_login.php");
exit();
}
function renderform($name='',$category='',$sub='',$price='',$detail='',$error='',$id=NULL){
if (isset($id)){
echo "ID : $id </br>";
}
if ($error != ''){
echo "<div style='border:1px solid red; color:red; text-align:center;'>$error </div>"; } ?>
<form method="post" action="">
<input type="hidden" name="id" value="<?php $id; ?>">
Product name : </br>
<input type="text" name="name" value="<?php echo $name; ?>"> </br>
Category : </br>
<input type="text" name="category" value="<?php echo $category; ?>"></br>
SubCategory : </br>
<input type="text" name="subcategory" value="<?php echo $sub; ?>"> </br>
Price : </br>
<input type="text" name="price" value="<?php echo $price; ?>"> </br>
Detail : </br>
<textarea name="detail" col="50" row="15" ><?php echo $detail; ?>