Hub of TutorialsHub of TutorialsHub of TutorialsHub of Tutorials
  • Technology
    • HTML
    • CSS
    • jQuery
    • WordPress
    • Core PHP
    • Mysql
    • JAVA
  • Others
  • Projects
  • Recipes
  • Deals
    • Web Hosting
      • Hostinger
      • Hostgator
  • Guest Post
  • Contact
Recommendation
Recommendation
How to Create Login system in PHP Using Session
  • No Comments

How to Create a Login system in PHP Using a Session

In this article, we will explain how to create a login system in PHP using a session. ['username']!=$username && $row['password']!=$password) { $error="<p>Wrong User Name and Password</p>"; } if(isset($error)) { echo $error; } else{ require('db.php'); session_start(); $result =mysql_query("select * from users where username='$username' and password='$password'"); while($row=mysql_fetch_array($result)) { $_SESSION['username']=$row['username']; echo"<script>window.location.href='../invoice/'</script>"; } } } ?> db.php <?php mysql_connect('localhost','root',''); […]
Read Full Article
How to Fetch Loged in Username
  • No Comments

How to Fetch Logged in Username

after login, we need to fetch Username. We will explain How to Fetch Logged in Username. index.php <?php include("db.php"); session_start(); if($_SESSION['username']=="") { session_destroy(); header("location:index.php"); } ?> <html> <head> <title>Fetch Loged in Username</title> </head> </body> <?php include('db.php'); $query="select * from user where username='".$_SESSION['username']."' "; $query1=mysql_query($query); $row=mysql_fetch_array($query1) ?> <h1> <?php echo $row['name']; ?></h1> </body> </html> db.php <?php […]
Read Full Article

Subscribe for the latest update!

Please wait

Thank you for your Subscribe! Please Check your Email.


Recent Posts

What is Web Hosting?

What is Web Hosting?

  • December 15, 2020
How To Set The Permalink In WordPress

How To Set The Permalink In WordPress

  • October 16, 2020
How to Add Website in Hostinger

How to Add Website in Hostinger

  • October 5, 2020
How to Change DNS in Hostinger

How to Change DNS in Hostinger

  • October 1, 2020
web hosting Hostgatorweb hosting Hostgator
  • How to Create List in HTML
  • How to use Iframe in HTML
  • How to Create a Table in HTML and CSS
  • How to Add New HTML Content using jQuery
  • CSS Property of List tag in HTML
  • How to use CSS for Table in HTML
  • Company Visitors Management System
  • Complaint Management System using PHP
  • Directory Management System
  • Employee Record Management System
  • Hospital Management System using PHP
  • Vehicle Parking Management System
  • Company Visitors Management System
  • Complaint Management System using PHP
  • Directory Management System
  • Employee Record Management System
  • Hospital Management System using PHP
  • Vehicle Parking Management System

2020 © All rights reserved by Hub of Tutorials