Server IP : 162.240.98.243 / Your IP : 18.116.14.245 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(); if(isset($_POST[submit])) { { $sql ="INSERT INTO regularmedicine(patientid,medicinename,dose,Frequency) values('$_POST[patientid]','$_POST[medicinename]','$_POST[dose]','$_POST[Frequency]')"; if($qsql = mysqli_query($con,$sql)) { echo "<script>alert('Medicine record inserted successfully...');</script>"; } else { echo mysqli_error($con); } } } ?> <table id="example2" class="table table-bordered table-hover"> <tr> <th><strong>Medicine Name </strong></th> <th><strong>Dose in MG</strong></th> <th><strong>Frequency </strong></th> </tr> <?php $sql ="SELECT * FROM regularmedicine WHERE patientid='$_GET[patientid]'"; $qsql = mysqli_query($con,$sql); while($rs = mysqli_fetch_array($qsql)) { echo " <tr> <td> $rs[medicinename]</td> <td> $rs[dose]</td> <td> $rs[Frequency]</td> </tr> "; } ?> </tr> </table> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <form method="post" name="submit"> <table id="example2" class="table table-bordered table-hover"> <?php $sqlpatient= "SELECT * FROM patient WHERE patientid='$_GET[patientid]'"; $qsqlpatient = mysqli_query($con,$sqlpatient); while($rspatient=mysqli_fetch_array($qsqlpatient)) { echo "<input type='hidden' name='patientid' id='patientid' value='$rspatient[patientid]'></td>"; } ?> </tr> <tr> <td height="62">Medicine Name</td> <td><input type="text" name="medicinename" id="medicinename"></td> </tr> <tr> <td height="62">Dose in mg</td> <td><input type="text" placeholder="Dose in MG" name="dose" id="dose" ></textarea></td> </tr> <td>Frequency</td> <td><select class="form-control" name="Frequency"> <option value="" disabled selected>Frequency </option> <option value="OD (Once Daily)">OD (Once Daily)</option> <option value="BID/b.i.d. (twice a day)">BID/b.i.d. (twice a day)</option> <option value="TID/t.id. (three times a day)">TID/t.id. (three times a day)</option> <option value="QID/q.i.d. (four times a day)">QID/q.i.d. (four times a day)</option> <option value="QHS (every bedtime)"> QHS (every bedtime) </option> <option value="Q4h (every 4 hours)">Q4h (every 4 hours)</option> <option value="Q4-6h (every 4 to 6 hours)">Q4-6h (every 4 to 6 hours)</option> <option value="QWK (every week)">QWK (every week)</option> </select></td> </tr> <tr> <td colspan="2" align="center"><input type="submit" name="submit" id="submit" value="Add Medicine" /></td> </tr> </table> </form>