File manager - Edit - /home/autoph/public_html/pms_v1/userguide/saveNewAdminFAQ.php
Back
<?php include_once("../../../cfg/conn.php"); //error_reporting(0); if(isset($_POST['save'])){ $count = 0; $faqDesc = $_POST['faqDesc']; $faqTitle = $_POST['faqTitle']; $getC = "SELECT COUNT(1) AS myCount FROM `admin_book` WHERE `deleted`='0' LIMIT 1"; $gCQ = mysqli_query($conn,$getC); while($cn=mysqli_fetch_array($gCQ)){ $myCount = $cn['myCount'] + 1; } $sql = "INSERT INTO `admin_book` (`id`, `book_title`,`seq_no`, `book_desc`) VALUES ('', '$faqTitle', '$myCount', '$faqDesc')"; if ($conn->query($sql) === TRUE) { //echo "New record created successfully"; } else { //echo "Error: " . $sql . "<br>" . $conn->error; } $getGuide = "SELECT * FROM `admin_book` WHERE `deleted`='0' ORDER BY `seq_no` ASC LIMIT 50"; //$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-left'>NO</th>"; echo "<th class='col-4'>HOW TO? (an Admin configuration guide)</th>"; echo "<th class='col-7'>DESCRIPTION</th>"; echo "</thead>"; if($statRow > 0){ while($row = mysqli_fetch_array($getStep)){ $count = $count + 1; ?><tr onclick="javascript:getInfoStep(this);" ><?php echo "<td class=' text-center'>".$row['seq_no'] ."</td>"; echo "<td class=' text-left'>".$row['book_title'] ."</td>"; echo "<td class=' text-left'>".$row['book_title']."</td>"; echo "<tr>"; } } echo "</table>"; $conn->close(); } ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings