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(); error_reporting(0); include("includes/config.php"); if(isset($_..

Decoded Output download

<?php 
session_start(); 
error_reporting(0); 
include("includes/config.php"); 
if(isset($_POST['submit'])) 
{ 
    $regno=$_POST['regno']; 
    $password=md5($_POST['password']); 
$query=mysql_query("SELECT * FROM students WHERE StudentRegno='$regno' and password='$password'"); 
$num=mysql_fetch_array($query); 
if($num>0) 
{ 
$extra="change-password.php";// 
$_SESSION['login']=$_POST['regno']; 
$_SESSION['id']=$num['studentRegno']; 
$_SESSION['sname']=$num['studentName']; 
$uip=$_SERVER['REMOTE_ADDR']; 
$status=1; 
$log=mysql_query("insert into userlog(studentRegno,userip,status) values('".$_SESSION['login']."','$uip','$status')"); 
$host=$_SERVER['HTTP_HOST']; 
$uri=rtrim(dirname($_SERVER['PHP_SELF']),'/\'); 
header("location:http://$host$uri/$extra"); 
exit(); 
} 
else 
{ 
$_SESSION['errmsg']="Invalid Reg no or Password"; 
$extra="index.php"; 
$host  = $_SERVER['HTTP_HOST']; 
$uri  = rtrim(dirname($_SERVER['PHP_SELF']),'/\'); 
header("location:http://$host$uri/$extra"); 
exit(); 
} 
} 
?> 
 
<!DOCTYPE html> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
    <meta charset="utf-8" /> 
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" /> 
    <meta name="description" content="" /> 
    <meta name="author" content="" /> 
 
    <title>Admin Panel</title> 
    <link href="assets/css/bootstrap.css" rel="stylesheet" /> 
    <link href="assets/css/font-awesome.css" rel="stylesheet" /> 
    <link href="assets/css/style.css" rel="stylesheet" /> 
</head> 
<body> 
    <?php include('includes/header.php');?> 
<section class="menu-section"> 
        <div class="container"> 
            <div class="row"> 
                <div class="col-md-12"> 
                    <div class="navbar-collapse collapse "> 
                        <ul id="menu-top" class="nav navbar-nav navbar-right"> 
                             <li><a href="request.php">Apply Online  </a></li> 
			    <li><a href="index.php">Personal Login  </a></li> 
			   <li><a href="csp.php">CSP Login  </a></li>   
			    <li><a href="admin/index.php">Admin Login  </a></li>  
                         
                        </ul> 
                    </div> 
                </div> 
 
            </div> 
        </div> 
    </section>     
    <div class="content-wrapper"> 
        <div class="container"> 
            <div class="row"> 
                <div class="col-md-12"> 
                    <h4 class="page-head-line">Personal Login To Enter </h4> 
 
                </div> 
 
            </div> 
             <span style="color:red;" ><?php echo htmlentities($_SESSION['errmsg']); ?><?php echo htmlentities($_SESSION['errmsg']="");?></span> 
            <form name="admin" method="post"> 
            <div class="row"> 
                <div class="col-md-6"> 
                     <label>Enter User Id : </label> 
                        <input type="text" name="regno" class="form-control"  /> 
                        <label>Enter Password :  </label> 
                        <input type="password" name="password" class="form-control"  /> 
                        <hr /> 
                        <button type="submit" name="submit" class="btn btn-info"><span class="glyphicon glyphicon-user"></span> &nbsp;Log Me In </button>&nbsp; 
                </div> 
                </form> 
              <!--  <div class="col-md-6"> 
                    <div class="alert alert-info"> 
                        This is a free bootstrap admin template with basic pages you need to craft your project.  
                        Use this template for free to use for personal and commercial use. 
                        <br /> 
                         <strong> Some of its features are given below :</strong> 
                        <ul> 
                            <li> 
                                Responsive Design Framework Used 
                            </li> 
                            <li> 
                                Easy to use and customize 
                            </li> 
                            <li> 
                                Font awesome icons included 
                            </li> 
                            <li> 
                                Clean and light code used. 
                            </li> 
                        </ul> 
                        
                    </div> 
                                    </div>--!> 
 
            </div> 
        </div> 
    </div> 
    <!-- CONTENT-WRAPPER SECTION END--> 
    <?php include('includes/footer.php');?> 
    <!-- FOOTER SECTION END--> 
    <!-- JAVASCRIPT AT THE BOTTOM TO REDUCE THE LOADING TIME  --> 
    <!-- CORE JQUERY SCRIPTS --> 
    <script src="assets/js/jquery-1.11.1.js"></script> 
    <!-- BOOTSTRAP SCRIPTS  --> 
    <script src="assets/js/bootstrap.js"></script> 
</body> 
</html> 

Did this file decode correctly?

Original Code

<?php
session_start();
error_reporting(0);
include("includes/config.php");
if(isset($_POST['submit']))
{
    $regno=$_POST['regno'];
    $password=md5($_POST['password']);
$query=mysql_query("SELECT * FROM students WHERE StudentRegno='$regno' and password='$password'");
$num=mysql_fetch_array($query);
if($num>0)
{
$extra="change-password.php";//
$_SESSION['login']=$_POST['regno'];
$_SESSION['id']=$num['studentRegno'];
$_SESSION['sname']=$num['studentName'];
$uip=$_SERVER['REMOTE_ADDR'];
$status=1;
$log=mysql_query("insert into userlog(studentRegno,userip,status) values('".$_SESSION['login']."','$uip','$status')");
$host=$_SERVER['HTTP_HOST'];
$uri=rtrim(dirname($_SERVER['PHP_SELF']),'/\\');
header("location:http://$host$uri/$extra");
exit();
}
else
{
$_SESSION['errmsg']="Invalid Reg no or Password";
$extra="index.php";
$host  = $_SERVER['HTTP_HOST'];
$uri  = rtrim(dirname($_SERVER['PHP_SELF']),'/\\');
header("location:http://$host$uri/$extra");
exit();
}
}
?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <meta name="description" content="" />
    <meta name="author" content="" />

    <title>Admin Panel</title>
    <link href="assets/css/bootstrap.css" rel="stylesheet" />
    <link href="assets/css/font-awesome.css" rel="stylesheet" />
    <link href="assets/css/style.css" rel="stylesheet" />
</head>
<body>
    <?php include('includes/header.php');?>
<section class="menu-section">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <div class="navbar-collapse collapse ">
                        <ul id="menu-top" class="nav navbar-nav navbar-right">
                             <li><a href="request.php">Apply Online  </a></li>
			    <li><a href="index.php">Personal Login  </a></li>
			   <li><a href="csp.php">CSP Login  </a></li>  
			    <li><a href="admin/index.php">Admin Login  </a></li> 
                        
                        </ul>
                    </div>
                </div>

            </div>
        </div>
    </section>    
    <div class="content-wrapper">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <h4 class="page-head-line">Personal Login To Enter </h4>

                </div>

            </div>
             <span style="color:red;" ><?php echo htmlentities($_SESSION['errmsg']); ?><?php echo htmlentities($_SESSION['errmsg']="");?></span>
            <form name="admin" method="post">
            <div class="row">
                <div class="col-md-6">
                     <label>Enter User Id : </label>
                        <input type="text" name="regno" class="form-control"  />
                        <label>Enter Password :  </label>
                        <input type="password" name="password" class="form-control"  />
                        <hr />
                        <button type="submit" name="submit" class="btn btn-info"><span class="glyphicon glyphicon-user"></span> &nbsp;Log Me In </button>&nbsp;
                </div>
                </form>
              <!--  <div class="col-md-6">
                    <div class="alert alert-info">
                        This is a free bootstrap admin template with basic pages you need to craft your project. 
                        Use this template for free to use for personal and commercial use.
                        <br />
                         <strong> Some of its features are given below :</strong>
                        <ul>
                            <li>
                                Responsive Design Framework Used
                            </li>
                            <li>
                                Easy to use and customize
                            </li>
                            <li>
                                Font awesome icons included
                            </li>
                            <li>
                                Clean and light code used.
                            </li>
                        </ul>
                       
                    </div>
                                    </div>--!>

            </div>
        </div>
    </div>
    <!-- CONTENT-WRAPPER SECTION END-->
    <?php include('includes/footer.php');?>
    <!-- FOOTER SECTION END-->
    <!-- JAVASCRIPT AT THE BOTTOM TO REDUCE THE LOADING TIME  -->
    <!-- CORE JQUERY SCRIPTS -->
    <script src="assets/js/jquery-1.11.1.js"></script>
    <!-- BOOTSTRAP SCRIPTS  -->
    <script src="assets/js/bootstrap.js"></script>
</body>
</html>

Function Calls

session_start 1
error_reporting 1

Variables

None

Stats

MD5 a8c438026aa109f350c9114e87154bff
Eval Count 0
Decode Time 105 ms