One Hat Cyber Team
Your IP :
216.73.216.186
Server IP :
93.127.173.44
Server :
Linux in-mum-web1837.main-hosting.eu 5.14.0-503.34.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Mar 27 06:00:50 EDT 2025 x86_64
Server Software :
LiteSpeed
PHP Version :
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
u322583024
/
domains
/
awaha.in
/
public_html
/
View File Name :
fetch-latest-order-id.php
<?php require_once 'admin/connection.inc.php'; // Fetch the latest order ID $sql = "SELECT order_id FROM orders ORDER BY order_id DESC LIMIT 1"; // Adjust table name if different $result = $conn->query($sql); if ($result->num_rows > 0) { $row = $result->fetch_assoc(); $lastOrderID = $row['order_id']; // Extract numeric part from AWAHAx preg_match('/AWAHA(\d+)/', $lastOrderID, $matches); $nextNumber = isset($matches[1]) ? intval($matches[1]) + 1 : 1; } else { $nextNumber = 1; // If no previous order exists, start from 1 } $nextOrderID = "AWAHA" . $nextNumber; echo json_encode(["order_id" => $nextOrderID]); ?>