-> First Download Wamp Server or Xamp Server and Setup Your Drive And Check Avaiblity Of Xamp or Wamp.
-> Create Database in mysql database. and Create New Table and Insert New Record Like User name, Password, Full name, And extra Details....
-> and next Step is Create new page login.php or index.php
-> Write Code on Creating File.
->Establish Connection of Your Databse.
->create new file like config or connection... like(dbuser,dbpassword, and connection details..)
->The Following Code write in your index or Login Page.
<?php
//old path
//include('config/connection.php');
//new path
include('../../db/connection.php');
if(isset($login))
{
$str="select*from admin where status='active' and user_name='$username' and password='$password';";
$data=mysqli_query($conn,$str);
$search=mysqli_num_rows($data);
if($search>0)
{
$_SESSION['user_name']=$username;
?><script>window.location='<?php echo $domain_path; ?>dashboard.php';</script><?php
}
else
{
$error="Incorrect Username or Password...";
}
}
?>
Comments
Post a Comment