File manager - Edit - /home/autoph/public_html/pms_v1/userguide/saveNewCOC.php
Back
<?php include_once("../../../cfg/conn.php"); //error_reporting(0); if(isset($_POST['saveCOC'])){ $count = 0; $cocTitle = $_POST['cocTitle']; $cocDesc = $_POST['cocDesc']; $getC = "SELECT COUNT(1) AS myCount FROM `ahg_coc` WHERE `deleted`='0' LIMIT 1"; $gCQ = mysqli_query($conn,$getC); while($cn=mysqli_fetch_array($gCQ)){ $myCount = $cn['myCount'] + 1; } $sql = "INSERT INTO `ahg_coc` (`id`, `coc_title`,`seq_no`, `coc_description`) VALUES ('', '$cocTitle', '$myCount', '$cocDesc')"; if ($conn->query($sql) === TRUE) { //echo "New record created successfully"; } else { //echo "Error: " . $sql . "<br>" . $conn->error; } $getGuide = "SELECT * FROM `ahg_coc` WHERE `deleted`='0' ORDER BY `seq_no` ASC"; //$getAreaList = "SELECT * FROM `pms_area_tbl` WHERE deleted ='0'"; $getStep = mysqli_query($conn,$getGuide); $statRow = mysqli_num_rows($getStep); echo "<table class='w-100'>"; echo "<thead>"; echo "<th class='col-1 text-center'>NO</th>"; echo "<th class='col-2 text-center'>NO</th>"; echo "<th class='col-10'>STEP-BY-STEP INSTRUCTION</th>"; echo "</thead>"; if($statRow > 0){ while($row = mysqli_fetch_array($getStep)){ ?><tr onclick="javascript:getInfoStep(this);" ><?php echo "<td class=' text-center'>".$row['seq_no'] ."</td>"; echo "<td class=' text-center'>".$row['coc_title'] ."</td>"; echo "<td class=' text-left'>".$row['coc_description']."</td>"; echo "<tr>"; } } echo "</table>"; $conn->close(); } ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings