set_charset("utf8");
$query="INSERT INTO `".SHOP_ID."_cat` ( `category`)VALUES(?)";
$stmt = $link->prepare($query);
if($stmt){
$stmt->bind_param("s", $_POST['category'] );
//if(!$stmt->execute()) echo '' . mysqli_error($link) . '
';
if(!$stmt->execute()) echo '' . mysqli_error($link) . '
';
else {
echo ' '.$_POST['category'].' added as a new category
';
}
}
else echo mysqli_error($link);
$link->close();
}
// $stmt = $link->prepare("INSERT INTO ".MYSQL_TB13." (`batch`, `std_name`, `tchr_name`)VALUES(?,?,?)");
// if($stmt){
// $stmt->bind_param("sss", $batch,$student,$teacher);
// //if(!$stmt->execute()) echo '' . mysqli_error($link) . '
';
// if(!$stmt->execute()) echo '' . mysqli_error($link) . '
';
// else {
// echo 'Student Register Successfull
Add Another';
// }
// }
// else echo mysqli_error($link);
// $link->close();
// }
?>