Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php $servername = "localhost"; $username = "root"; $password = ""; $dbname ="form_da..
Decoded Output download
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname ="form_data";
// Database connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
// Fetch all data
$sql = "SELECT * FROM data_admin";
$result = $conn->query($sql);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Panel</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container mt-5">
<h2>Admin Panel: Enquiry Data</h2>
<table class="table table-bordered">
<thead>
<tr>
<th>ID</th>
<th>First Name</th>
<th>Last Name</th>
<th>Email</th>
<th>Phone</th>
<th>Address</th>
<th>Subject</th>
<th>Message</th>
<th>Submitted At</th>
</tr>
</thead>
<tbody>
<?php
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
echo "<tr>
<td>{$row['id']}</td>
<td>{$row['fisrtname']}</td>
<td>{$row['lastname']}</td>
<td>{$row['email']}</td>
<td>{$row['phone']}</td>
<td>{$row['address']}</td>
<td>{$row['subject']}</td>
<td>{$row['message']}</td>
<td>{$row['created_at']}</td>
</tr>";
}
} else {
echo "<tr><td colspan='9'>No enquiries found.</td></tr>";
}
?>
</tbody>
</table>
</div>
</body>
</html>
<?php
$conn->close();
?>
Did this file decode correctly?
Original Code
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname ="form_data";
// Database connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
// Fetch all data
$sql = "SELECT * FROM data_admin";
$result = $conn->query($sql);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Panel</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container mt-5">
<h2>Admin Panel: Enquiry Data</h2>
<table class="table table-bordered">
<thead>
<tr>
<th>ID</th>
<th>First Name</th>
<th>Last Name</th>
<th>Email</th>
<th>Phone</th>
<th>Address</th>
<th>Subject</th>
<th>Message</th>
<th>Submitted At</th>
</tr>
</thead>
<tbody>
<?php
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
echo "<tr>
<td>{$row['id']}</td>
<td>{$row['fisrtname']}</td>
<td>{$row['lastname']}</td>
<td>{$row['email']}</td>
<td>{$row['phone']}</td>
<td>{$row['address']}</td>
<td>{$row['subject']}</td>
<td>{$row['message']}</td>
<td>{$row['created_at']}</td>
</tr>";
}
} else {
echo "<tr><td colspan='9'>No enquiries found.</td></tr>";
}
?>
</tbody>
</table>
</div>
</body>
</html>
<?php
$conn->close();
?>
Function Calls
mysqli_connect | 1 |
Stats
MD5 | 3fb01ce8356dae82ef95d806fef7d545 |
Eval Count | 0 |
Decode Time | 75 ms |