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 include 'config/db.php'; $data = $_POST; if (isset($data['go_button']) ) { ..
Decoded Output download
<?php
include 'config/db.php';
$data = $_POST;
if (isset($data['go_button']) )
{
$errors = array();
if (trim($data['login']) == '')
{
$errors[] = ', .';
}
if (trim($data['email']) == '')
{
$errors[] = ', email.';
}
if ($data['password'] == '')
{
$errors[] = ', .';
}
if ($data['password_2'] != $data['password'])
{
$errors[] = ', .';
}
if (trim($data['day']) == 'day')
{
$errors[] = ', . ()';
}
if (trim($data['month']) == 'month')
{
$errors[] = ', . ()';
}
if (trim($data['year']) == 'year')
{
$errors[] = ', . ()';
}
$login = $_POST['login'];
$result = mysqli_query($Connection, "SELECT id FROM users WHERE login = '$login'");
$myrow = mysqli_fetch_array($result);
if (!empty($myrow['id']))
{
$errors[] = ' !';
}
$email = $_POST['email'];
$result = mysqli_query($Connection, "SELECT id FROM users WHERE email = '$email'");
$myrow = mysqli_fetch_array($result);
if (!empty($myrow['id']))
{
$errors[] = ' email !';
}
if (empty($errors) )
{
$login = $_POST['login'];
$email = $_POST['email'];
$password = md5(md5(trim($_POST['password'])));
$day = $_POST['day'];
$month = $_POST['month'];
$year = $_POST['year'];
$sex = $_POST['sex'];
$query = mysqli_query($Connection, "INSERT INTO `users` (`login`, `email`, `password`, `day`, `month`, `year`, `sex`) VALUES ('$login', '$email', '$password', '$day', '$month', '$year', '$sex')");
$message_true = '
<div class="notify_true">
<a href="#" class="close_true">×</a>
<div class="title_true"></div>
<div class="text_true"> </div>
</div>';
}else
{
$message_false = '
<div class="notify">
<a href="#" class="close">×</a>
<div class="title"></div>
<div class="text">'.array_shift($errors).'</div>
</div>';
}
}
?>
Did this file decode correctly?
Original Code
<?php
include 'config/db.php';
$data = $_POST;
if (isset($data['go_button']) )
{
$errors = array();
if (trim($data['login']) == '')
{
$errors[] = ', .';
}
if (trim($data['email']) == '')
{
$errors[] = ', email.';
}
if ($data['password'] == '')
{
$errors[] = ', .';
}
if ($data['password_2'] != $data['password'])
{
$errors[] = ', .';
}
if (trim($data['day']) == 'day')
{
$errors[] = ', . ()';
}
if (trim($data['month']) == 'month')
{
$errors[] = ', . ()';
}
if (trim($data['year']) == 'year')
{
$errors[] = ', . ()';
}
$login = $_POST['login'];
$result = mysqli_query($Connection, "SELECT id FROM users WHERE login = '$login'");
$myrow = mysqli_fetch_array($result);
if (!empty($myrow['id']))
{
$errors[] = ' !';
}
$email = $_POST['email'];
$result = mysqli_query($Connection, "SELECT id FROM users WHERE email = '$email'");
$myrow = mysqli_fetch_array($result);
if (!empty($myrow['id']))
{
$errors[] = ' email !';
}
if (empty($errors) )
{
$login = $_POST['login'];
$email = $_POST['email'];
$password = md5(md5(trim($_POST['password'])));
$day = $_POST['day'];
$month = $_POST['month'];
$year = $_POST['year'];
$sex = $_POST['sex'];
$query = mysqli_query($Connection, "INSERT INTO `users` (`login`, `email`, `password`, `day`, `month`, `year`, `sex`) VALUES ('$login', '$email', '$password', '$day', '$month', '$year', '$sex')");
$message_true = '
<div class="notify_true">
<a href="#" class="close_true">×</a>
<div class="title_true"></div>
<div class="text_true"> </div>
</div>';
}else
{
$message_false = '
<div class="notify">
<a href="#" class="close">×</a>
<div class="title"></div>
<div class="text">'.array_shift($errors).'</div>
</div>';
}
}
?>
Function Calls
| None |
Stats
| MD5 | b89b97f18f9b7dd45aba0b0414deeb1c |
| Eval Count | 0 |
| Decode Time | 96 ms |