File manager - Edit - /home/autoph/public_html/connect/home/sub_save_cust_vehicles.php
Back
<?php $connect_error = 'Sorry, we\'re experiencing connection problem. Please try again later... Thank you!'; mysql_connect('localhost','root','aee1024') or die ($connect_error); mysql_select_db('db_vts') or die($connect_error); error_reporting(1); //echo "Connected"; if(isset($_POST['likes'])){ $vhCustID = mysql_escape_string($_POST['vhCustID']); $vhCompID = mysql_escape_string($_POST['vhCompID']); $brandSelected = mysql_escape_string($_POST['brandSelected']); $brandName = mysql_result(mysql_query("SELECT `b_name` FROM `vts_brands` WHERE `b_id`='$brandSelected'"),0); $para = mysql_escape_string($_POST['para']); $vhTrans = mysql_escape_string($_POST['vhTrans']); $vhPlate = mysql_escape_string($_POST['vhPlate']); $vhColor = mysql_escape_string($_POST['vhColor']); $vhMake = mysql_escape_string($_POST['vhMake']); $vType = mysql_escape_string($_POST['vType']); $vhUserID = mysql_escape_string($_POST['vhUserID']); $vhDate = mysql_escape_string($_POST['vhDate']); $vhDealID = mysql_escape_string($_POST['vhDealID']); mysql_query("INSERT INTO vts_vehicle_lists (v_type, v_plate, v_model, v_brand, v_color, v_make, v_gear, date_added, add_by, sold_by_dealer, cust_id,v_owner_id) VALUES('{$vType}','{$vhPlate}','{$para}','{$brandName}','{$vhColor}','{$vhMake}','{$vhTrans}','{$vhDate}','{$vhUserID}','{$vhDealID}','{$vhCustID}','{$vhCompID}')"); exit(); } if(isset($_POST['displayunit'])){ $vhCustID = mysql_escape_string($_POST['vhCustID']); $searchID= $loadCustData; $getVehicle=mysql_query("SELECT * FROM `vts_vehicle_lists` WHERE `cust_id`='$vhCustID' ORDER BY `v_plate` ASC"); echo "<table style='width:100%'>"; echo "<tr>"; echo "<td style='font-family:Calibri;font-size:10px;border:1px solid lightgray;background:#eafafa;padding:1px'>PLATE</td>"; echo "<td style='font-family:Calibri;font-size:10px;border:1px solid lightgray;background:#eafafa;padding:1px'>BRAND</td>"; echo "<td style='font-family:Calibri;font-size:10px;border:1px solid lightgray;background:#eafafa;padding:1px'>MODEL</td>"; echo "<td style='font-family:Calibri;font-size:10px;border:1px solid lightgray;background:#eafafa;padding:1px'>TYPE</td>"; echo "<td style='font-family:Calibri;font-size:10px;border:1px solid lightgray;background:#eafafa;padding:1px'>COLOR</td>"; echo "</tr>"; while($vRow = mysql_fetch_array($getVehicle)){ echo "<tr>"; echo "<td style='font-family:Calibri;font-size:10px;padding:1px;border:1px solid lightgray'>".$vRow['v_plate']."</td>"; echo "<td style='font-family:Calibri;font-size:10px;padding:1px;border:1px solid lightgray'>".$vRow['v_brand']."</td>"; echo "<td style='font-family:Calibri;font-size:10px;padding:1px;border:1px solid lightgray'>".$vRow['v_model']."</td>"; echo "<td style='font-family:Calibri;font-size:10px;padding:1px;border:1px solid lightgray'>".$vRow['v_type']."</td>"; echo "<td style='font-family:Calibri;font-size:10px;padding:1px;border:1px solid lightgray'>".$vRow['v_color']."</td>"; echo "</trd>"; } echo "</table>"; } ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings