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 // Database connection settings $servername = "localhost"; $username = "root"; $..

Decoded Output download

<?php 
// Database connection settings 
$servername = "localhost"; 
$username = "root"; 
$password = "password"; 
$database = "example_db"; 
 
// Create a connection 
$conn = new mysqli($servername, $username, $password, $database); 
 
// Check the connection 
if ($conn->connect_error) { 
    die("Connection failed: " . $conn->connect_error); 
} 
 
// Data to insert 
$name = "John Doe"; 
$email = "[email protected]"; 
$age = 30; 
 
// Prepare and bind SQL statement 
$stmt = $conn->prepare("INSERT INTO users (name, email, age) VALUES (?, ?, ?)"); 
$stmt->bind_param("ssi", $name, $email, $age); 
 
// Execute the statement 
if ($stmt->execute()) { 
    echo "New record created successfully!"; 
} else { 
    echo "Error: " . $stmt->error; 
} 
 
// Close the statement and connection 
$stmt->close(); 
$conn->close(); 
?> 

Did this file decode correctly?

Original Code

<?php
// Database connection settings
$servername = "localhost";
$username = "root";
$password = "password";
$database = "example_db";

// Create a connection
$conn = new mysqli($servername, $username, $password, $database);

// Check the connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}

// Data to insert
$name = "John Doe";
$email = "[email protected]";
$age = 30;

// Prepare and bind SQL statement
$stmt = $conn->prepare("INSERT INTO users (name, email, age) VALUES (?, ?, ?)");
$stmt->bind_param("ssi", $name, $email, $age);

// Execute the statement
if ($stmt->execute()) {
    echo "New record created successfully!";
} else {
    echo "Error: " . $stmt->error;
}

// Close the statement and connection
$stmt->close();
$conn->close();
?>

Function Calls

None

Variables

$database example_db
$password password
$username root
$servername localhost

Stats

MD5 4a86bbc1c2f0b6e5118294fd3cd87cb3
Eval Count 0
Decode Time 69 ms