ohctech_p8/save_medicine_category.php
Dushant Mali 899fb3e65a Upgrade 7 to 8
Upgrade 7 to 8
2024-11-02 18:03:13 +05:30

30 lines
721 B
PHP

<?php
include('includes/config/config.php');
$initial_query="";
$end_query="";
if(!empty($medicine_usage_cat_id)){
$initial_query="update medicine_usage_cat ";
$end_query="where medicine_usage_cat_id='".$_POST['medicine_usage_cat_id']."' ";
}else{
$initial_query="insert into medicine_usage_cat";
$end_query="";
}
$final_query=$initial_query." set medicine_usage_cat_name='".$_POST['medicine_usage_cat_name']."',cat_desc='".$_POST['cat_desc']."',code='".$_POST['code']."',modified_by='".$_SESSION['user_id']."' ".$end_query;
echo $final_query;
if (!$result = @mysqli_query($conn,$final_query)) {
die(mysqli_error($conn));
}else{
$data="success";
}
echo json_encode($data);
?>