Server IP : 162.240.98.243 / Your IP : 18.222.184.200 Web Server : Apache System : Linux server.bti.yaw.mybluehostin.me 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : btiyawmy ( 1003) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/btiyawmy/public_html/login.easenup.in/ |
Upload File : |
<?php session_start(); include("dbconnection.php"); require_once('../DBManager.php'); require_once("../LoginManager.php"); require_once('../patientmanager.php'); include("header.php"); include("workdeskmenu.php"); if(isset($_POST[opdmedicine])) { $sql="UPDATE consumable_stock SET Category='$_POST[Category]',ConsumableName='$_POST[ConsumableName]',Size='$_POST[Size]',BrandName='$_POST[BrandName]' WHERE Consumable_id='$_GET[Consumable_id]'"; if($qsql = mysqli_query($con,$sql)) { echo "<script>alert('Update successfully');</script><script> window.history.go(-2)</script>"; } } ?> <!DOCTYPE html> <html> <head> <title>Consumable in Stock</title> </head> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <body> <h2 Align="center">Medicine in Stock </h2> </tbody> <tfoot> </tfoot> </table> <form class='form1' name="opdmedicine" method="post"> <?php include("dbconnection.php"); require_once('../DBManager.php'); require_once('../LoginManager.php'); $sql ="SELECT * FROM consumable_stock WHERE Consumable_id='$_GET[Consumable_id]'"; $qsql = mysqli_query($con,$sql); if($rs = mysqli_fetch_array($qsql)) { echo " <label>Consumable & Disposable</label> <select id='Category' name='Category' required> <option value=''>Choose Category</option>"; $mc="SELECT * FROM master_category"; $qMC1 = mysqli_query($con,$mc); while($RowMc = mysqli_fetch_array($qMC1)){ $category = "SELECT * FROM category where Mcat_id='$RowMc[id]'"; $qMC = mysqli_query($con,$category); while($rMC = mysqli_fetch_array($qMC)) {?> <option value='<?php echo $rMC["crid"] ?>' <?php echo ($rMC["crid"]==$rs["Category"])?"selected":""; ?>> <?php echo $rMC["subCat"]; ?> ( <?php echo $RowMc["MCategory"] ?>)</option>"; <?php }} echo " </select> <label>Consumable Name</label> <input type='text' placeholder='Consumable Name' name='ConsumableName' value='$rs[ConsumableName]' id='ConsumableName' class='form-control' /> <label>Size</label> <input type='text' placeholder='Packaging Size' value='$rs[Size]' name='Size' id='Size' class='form-control' /> <label>Name of Brand</label> <input type='text' value='$rs[BrandName]' onkeyup='this.value = this.value.toUpperCase();' placeholder='Name of Brand' name='BrandName' id='BrandName' class='form-control' /> <br> <input type='submit' value='Update' name='opdmedicine'> </form> "; } ?> </div> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.12.6/js/standalone/selectize.min.js" integrity="sha256-+C0A5Ilqmu4QcSPxrlGpaZxJ04VjsRjKu+G82kl5UJk=" crossorigin="anonymous"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.12.6/css/selectize.bootstrap3.min.css" integrity="sha256-ze/OEYGcFbPRmvCnrSeKbRTtjG4vGLHXgOqsyLFTRjg=" crossorigin="anonymous" /> <script> $(document).ready(function () { $('select').selectize({ sortField: 'text' }); }); </script> </body> </html>