File manager - Edit - /home/autoph/public_html/pms_v1/ajaxSave/saveNewModel.php
Back
<?php include_once("../../../cfg/conn.php"); include ("../functions/users.php"); if(isset($_POST['pmsAction'])){ $brandID = $_POST['brandID']; $userID = $_POST['userID']; $modelName = $_POST['modelName']; $description = $_POST['description']; $sql = "INSERT INTO pms_car_models (`id`, `brand_id`,`model_code`, `model_desc`,`created_by`) VALUES ('', '$brandID', '$modelName','$description','$userID')"; if ($conn->query($sql) === TRUE) { //echo "New record created successfully"; } else { //echo "Error: " . $sql . "<br>" . $conn->error; } ?> <thead> <th class='col-1'>REC.ID</thd> <th class='col-3'>BRAND</th> <th class='col-2'>Model CODE</th> <th class='col-5'>DESCRIPTION</th> <th style="width:2%"></th> <th style="width:2%"></th> <th style="width:2%"></th> </thead> <?php $getBranchList = "SELECT * FROM `pms_car_models` WHERE `deleted`='0' ORDER BY `id` DESC LIMIT 50"; $getBranch = mysqli_query($conn,$getBranchList); $statRow = mysqli_num_rows($getBranch); if($statRow > 0){ while($row = mysqli_fetch_array($getBranch)){ ?><tr onclick="javascript:getInfo(this);" ><?php echo "<td class='p-2'>".$row['id']."</td>"; echo "<td class='p-2'>"; echo getBrandName($row['brand_id'])[0]; echo "</td>"; echo "<td class='p-2'>".$row['model_code']."</td>"; echo "<td class='p-2'>".$row['model_desc']."</td>"; echo "<td class='p-2' style='width:2%'>";?> <!--<abbr title='View KRA'><i class='fa fa-plus-circle' aria-hidden='true' style='cursor:pointer;color:green;float:right;font-size:18px'></i> </abbr>--> <i data-toggle="modal" data-target="#kraModal" class="fa fa-list-ol" style='cursor:pointer;color:green;float:right;font-size:18px'></i> <?php echo "</td>"; echo "<td class='p-2' style='width:2%'>";?> <!--<abbr title='View KRA'><i class='fa fa-plus-circle' aria-hidden='true' style='cursor:pointer;color:green;float:right;font-size:18px'></i> </abbr>--> <i data-toggle="modal" data-target="#editPMSModal" class="fa fa-pencil-square-o" style='cursor:pointer;color:green;float:right;font-size:18px'></i> <?php echo "</td>"; echo "<td class='p-2' style='width:2%'> <abbr title='Delete record'><i class='fa fa-trash ' aria-hidden='true' style='color:#FF0800;float:left;font-size:18px'></i></abbr> </td>"; echo "<tr>"; } } $conn->close(); } ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings