One Hat Cyber Team
Your IP :
216.73.216.240
Server IP :
162.240.106.28
Server :
Linux server.ganesand.com 3.10.0-1160.80.1.el7.x86_64 #1 SMP Tue Nov 8 15:48:59 UTC 2022 x86_64
Server Software :
Apache
PHP Version :
7.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
thoa
/
public_html
/
admin
/
View File Name :
logi.php
<?php session_start(); // Starting Session $error=''; // Variable To Store Error Message if (isset($_POST['submit'])) { if (empty($_POST['username']) || empty($_POST['password'])) { $error = "Username or Password is invalid"; } else { // Define $username and $password $username=$_POST['username']; $password=$_POST['password']; // Establishing Connection with Server by passing server_name, user_id and password as a parameter $connection = mysql_connect("localhost", "root", ""); // To protect MySQL injection for Security purpose $username = stripslashes($username); $password = stripslashes($password); $username = mysql_real_escape_string($username); $password = mysql_real_escape_string($password); // Selecting Database $db = mysql_select_db("horoscope", $connection); // SQL query to fetch information of registerd users and finds user match. $query = mysql_query("select * from admin where password='$password' AND username='$username'", $connection); $rows = mysql_num_rows($query); if ($rows == 1) { $_SESSION['login_user']=$username; // Initializing Session header("location: index.php"); // Redirecting To Other Page } else { $error = "Username or Password is invalid"; } mysql_close($connection); // Closing Connection } } ?>