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 session_start(); if (isset($_SESSION['user_id'])) { header("Location: account"..
Decoded Output download
<?php session_start();
if (isset($_SESSION['user_id'])) {
header("Location: account");
}
include "inc/dbconfig.php";
include "inc/functions.php";
$_1 = "";
$_2 = "";
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$_3 = clean($_POST["fullname"]);
$_4 = clean($_POST["phone"]);
$_5 = clean($_POST["email"]);
$_6 = clean($_POST["password"]);
$_7 = explode(" ", $_3);
$_8 = $_7[0];
$_9 = isset($_7[1]) ? $_7[1] : '';
if (!filter_var($_5, FILTER_VALIDATE_EMAIL)) {
$_1 = "Invalid email format.";
} else {
$_10 = "SELECT * FROM customers WHERE email = '$_5'";
$_11 = $_12->query($_10);
if ($_11 === false) {
$_1 = "An error occurred.";
} elseif ($_11->num_rows > 0) {
$_1 = "User with this email already exists.";
} else {
$_13 = password_hash($_6, PASSWORD_DEFAULT);
$_14 = "INSERT INTO customers (first_name, last_name, email, password, phone)
VALUES ('$_8', '$_9', '$_5', '$_13', '$_4')";
if ($_12->query($_14) === TRUE) {
$_2 = "Account created successfully. Please check your email for verification.";
$_15 = bin2hex(random_bytes(32));
$_16 = "UPDATE customers SET verification_token = '$_15' WHERE email = '$_5'";
$_12->query($_16);
$_17 = "http://$_SERVER[HTTP_HOST]";
$_18 = $_17 . "/verify.php?token=$_15";
$_19 = file_get_contents('emails/email_verification.php');
$_19 = str_replace('{verificationLink}', $_18, $_19);
$_20 = $_5;
$_21 = 'Basal Salon - New User registration';
$_22 = $_3 . " has registered with Basal Salon.";
$_23 = '[email protected]';
$_24 = 'Basal Salon - Email Verification';
$_25 = "From: Basal Salon <[email protected]>
";
$_25 .= "Content-Type: text/html; charset=UTF-8
";
$_26 = mail($_20, $_24, $_19, $_25);
$_27 = mail($_23, $_21, $_22, $_25);
if ($_26) {
} else {
$_1 = "Error sending email.";
}
} else {
$_1 = "Error creating account.";
}
}
}
mysqli_close($_12);
} ?>
Did this file decode correctly?
Original Code
<?php session_start();
if (isset($_SESSION['user_id'])) {
header("Location: account");
}
include "inc/dbconfig.php";
include "inc/functions.php";
$_1 = "";
$_2 = "";
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$_3 = clean($_POST["fullname"]);
$_4 = clean($_POST["phone"]);
$_5 = clean($_POST["email"]);
$_6 = clean($_POST["password"]);
$_7 = explode(" ", $_3);
$_8 = $_7[0];
$_9 = isset($_7[1]) ? $_7[1] : '';
if (!filter_var($_5, FILTER_VALIDATE_EMAIL)) {
$_1 = "Invalid email format.";
} else {
$_10 = "SELECT * FROM customers WHERE email = '$_5'";
$_11 = $_12->query($_10);
if ($_11 === false) {
$_1 = "An error occurred.";
} elseif ($_11->num_rows > 0) {
$_1 = "User with this email already exists.";
} else {
$_13 = password_hash($_6, PASSWORD_DEFAULT);
$_14 = "INSERT INTO customers (first_name, last_name, email, password, phone)
VALUES ('$_8', '$_9', '$_5', '$_13', '$_4')";
if ($_12->query($_14) === TRUE) {
$_2 = "Account created successfully. Please check your email for verification.";
$_15 = bin2hex(random_bytes(32));
$_16 = "UPDATE customers SET verification_token = '$_15' WHERE email = '$_5'";
$_12->query($_16);
$_17 = "http://$_SERVER[HTTP_HOST]";
$_18 = $_17 . "/verify.php?token=$_15";
$_19 = file_get_contents('emails/email_verification.php');
$_19 = str_replace('{verificationLink}', $_18, $_19);
$_20 = $_5;
$_21 = 'Basal Salon - New User registration';
$_22 = $_3 . " has registered with Basal Salon.";
$_23 = '[email protected]';
$_24 = 'Basal Salon - Email Verification';
$_25 = "From: Basal Salon <[email protected]>\r\n";
$_25 .= "Content-Type: text/html; charset=UTF-8\r\n";
$_26 = mail($_20, $_24, $_19, $_25);
$_27 = mail($_23, $_21, $_22, $_25);
if ($_26) {
} else {
$_1 = "Error sending email.";
}
} else {
$_1 = "Error creating account.";
}
}
}
mysqli_close($_12);
} ?>
Function Calls
header | 1 |
session_start | 1 |
Stats
MD5 | 726cedcafd534015ccbfee149dd72852 |
Eval Count | 0 |
Decode Time | 83 ms |