SlideShare a Scribd company logo
1 of 37
Download to read offline
AUTHOR: PARWIZ “DANYAR”
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
This article makes it easy to learn and use functions and sessions. Look at the
following procedure.
Step 1
Create a database as in the following:
Step 2
Create a table as in the following:
CREATE TABLE IF NOT EXISTS `users` (  
  `id` int(11) NOT NULL AUTO_INCREMENT,  `username` varchar(30) NOT NULL,  
  `emailid` varchar(30) NOT NULL,  `password` varchar(30) NOT NULL,  
   PRIMARY KEY (`id`)  
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; 
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
Step 3
Create a form named index.php as in the following:
<!DOCTYPE html>
<html lang="en”>
<head>
<meta charset="UTF-8" />
<title>Contact List | Login Page</title>
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<meta content="" name="description" />
<meta content="" name="author" />
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!-- GLOBAL STYLES -->
<!-- PAGE LEVEL STYLES -->
<link rel="stylesheet" href="assets/plugins/bootstrap/css/
bootstrap.css" />
<link rel="stylesheet" href="assets/css/login.css" />
<link rel="stylesheet" href="assets/plugins/magic/magic.css" />
<!-- END PAGE LEVEL STYLES à
</head>
<body >
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
<!-- PAGE CONTENT -->
<div class="container">
<div class="text-center">
</div>
<div class="tab-content">
<div id="login" class="tab-pane active">
<form action="index.php" method="post" class="form-signin">
<p class="text-muted text-center btn-block btn btn-primary btn-rect">
Enter your username and password
</p>
<input type="text" placeholder="E-mail" class="form-control" name="emailid"
id="emailid"/>
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
<input type="password" placeholder="Password" class="form-control"
name="password" id="password_log"/>
<button class="btn text-muted text-center btn-danger" type="submit"
name="login">Sign in</button>
</form>
</div>
<div id="forgot" class="tab-pane">
<form action="index.html" class="form-signin">
<p class="text-muted text-center btn-block btn btn-primary btn-
rect">Enter your valid e-mail</p>
<input type="email" required="required" placeholder="Your E-mail"
class="form-control" />
<br />
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
<button class="btn text-muted text-center btn-success" type="submit">Recover Password</
button>
</form>
</div>
<div id="signup" class="tab-pane">
<form action="index.php" method="post" class="form-signin">
<p class="text-muted text-center btn-block btn btn-primary btn-rect">Please Fill
Details To Register</p>
<input type="email" placeholder="E-mail" class="form-control" name="emailid"
id="emailid" required/>
<input type="text" placeholder="Username" class="form-control"
name="user_name" id="user_name" required/>
<input type="password" placeholder="Password" class="form-control"
name="password" id="password" required/>
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
<input type="password" placeholder="Confirm Password" class="form-control"
name="confirm_password" id="confirm_password" required/>
<button class="btn text-muted text-center btn-success" type="submit"
name="register">Register</button>
</form>
</div>
</div>
<div class="text-center">
<ul class="list-inline">
<li><a class="text-muted" href="#login" data-toggle="tab">Login</a></
li>
<li><a class="text-muted" href="#signup" data-toggle="tab">Signup</
a></li>
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
</ul>
</div>
</div>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<script src="assets/plugins/jquery-2.0.3.min.js"></script>
<script src="assets/plugins/bootstrap/js/bootstrap.js"></script>
<script src="assets/js/login.js"></script>
<!--END PAGE LEVEL SCRIPTS à
</body>
</html>
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
Step 4
Create a config file named config.php as in the following:
<?php  
    define("DB_HOST", 'localhost');  
    define("DB_USER", 'root');  
    define("DB_PASSWORD", '');  
    define("DB_DATABSE", 'mypratice');  
?> 
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
Step 5
Make a database connection class. Create the file named dbConnect.php
as in the following:
<?php  
    class dbConnect {  
        function __construct() {  
            require_once('config.php');  
            $conn = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);  
            mysql_select_db(DB_DATABSE, $conn); 
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
if(!$conn)// testing the connection  
            {  
                die ("Cannot connect to the database");  
            }   
            return $conn;  
        }  
        public function Close(){  
            mysql_close();  
        }  
    }  
?>  
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
Step 6
Make a Function class. Create the file named dbFunction.php as in the following:
<?php  
require_once 'dbConnect.php';  
session_start();  
    class dbFunction {  
        function __construct() {  
            // connecting to database  
            $db = new dbConnect();;   
        }  
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
function __destruct(){
}
public function user_register($user_name, $emailid, $password){
$rs = mysql_query("insert into users(user_name, emailid,
password) values('$user_name', '$emailid', '$password')");
return $rs;
}
public function login($emailid, $password){
$rs = mysql_query("select * from users where emailid = '".
$emailid."' and password = '".$password."'");
$rw = mysql_fetch_array($rs);
$no_rows = mysql_num_rows($rs);
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
if($no_rows == 1){
$_SESSION['login'] == true;
$_SESSION['idu'] = $rw['id'];
$_SESSION['user_name'] = $rw['user_name'];
$_SESSION['emailid'] = $rw['emailid'];
return true;
}else{
return false;
}
}
public function is_user_exist($emailid){
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
$rs = mysql_query("select * from users where emailid = '".$emailid."'");
$no_rows = mysql_num_rows($rs);
if($no_rows > 0){
return true;
}else{
return false;
}
}
}
?>
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
Step 7
After the preceding procedure use the Function in index.php as in the following:
<?php
require_once("db_function.php");
$funObj = new dbFunction();
// submit form for login user
if(isset($_POST['login'])){
// get user name
$emailid = htmlspecialchars($_POST['emailid']);
// get password
$password = htmlspecialchars($_POST['password']);
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
$user = $funObj -> login($emailid, $password);
if($user){
header("Location:home.php");
die();
}else{
echo "<script>alert('Your Email / Password Donot
match.')</script>";
}
}
// submit form for registering user
if(isset($_POST['register'])){
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
// get user name
$user_name =
htmlspecialchars(mysql_real_escape_string($_POST['user_name']));
// get email
$emailid =
htmlspecialchars(mysql_real_escape_string($_POST['emailid']));
// get password
$password =
htmlspecialchars(mysql_real_escape_string($_POST['password']));
// get confirm password
$confirm_password =
htmlspecialchars(mysql_real_escape_string($_POST['confirm_password']));
if($password == $confirm_password){
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
$email = $funObj -> is_user_exist($emailid);
if(!$email){
$register = $funObj -> user_register($user_name,
$emailid, $password);
if($register){
echo "<script>alert('Registration
Successful')</script>";
}else{
echo "<script>alert('Registration Not
Successful')</script>";
}
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
}else{
echo "<script>alert('Email Already Exist')</
script>";
}
}else{
echo "<script>alert('Password Not Match')</
script>";
}
}
?>
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
<!DOCTYPE html>
<html lang="en”>
<head>
<meta charset="UTF-8" />
<title>Contact List | Login Page</title>
<meta content="width=device-width, initial-scale=1.0" name="viewport" /
>
<meta content="" name="description" />
<meta content="" name="author" />
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
<link rel="stylesheet" href="assets/plugins/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" href="assets/css/login.css" />
<link rel="stylesheet" href="assets/plugins/magic/magic.css" />
</head>
<body >
<div class="container">
<div class="text-center">
</div>
<div class="tab-content">
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
<div id="login" class="tab-pane active">
<form action="index.php" method="post" class="form-signin">
<p class="text-muted text-center btn-block btn btn-primary btn-rect">
Enter your username and password
</p>
<input type="text" placeholder="E-mail" class="form-control"
name="emailid" id="emailid"/>
<input type="password" placeholder="Password" class="form-control"
name="password" id="password_log"/>
<button class="btn text-muted text-center btn-danger" type="submit"
name="login">Sign in</button>
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
</form>
</div>
<div id="forgot" class="tab-pane">
<form action="index.html" class="form-signin">
<p class="text-muted text-center btn-block btn btn-primary btn-
rect">Enter your valid e-mail</p>
<input type="email" required="required" placeholder="Your E-mail"
class="form-control" />
<br />
<button class="btn text-muted text-center btn-success"
type="submit">Recover Password</button>
</form>
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
</div>
<div id="signup" class="tab-pane">
<form action="index.php" method="post" class="form-signin">
<p class="text-muted text-center btn-block btn btn-primary btn-
rect">Please Fill Details To Register</p>
<input type="email" placeholder="E-mail" class="form-control"
name="emailid" id="emailid" required/>
<input type="text" placeholder="Username" class="form-control"
name="user_name" id="user_name" required/>
<input type="password" placeholder="Password" class="form-control"
name="password" id="password" required/>
<input type="password" placeholder="Confirm Password" class="form-
control" name="confirm_password" id="confirm_password" required/>
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
<button class="btn text-muted text-center btn-success" type="submit"
name="register">Register</button>
</form>
</div>
</div>
<div class="text-center">
<ul class="list-inline">
<li><a class="text-muted" href="#login" data-toggle="tab">Login</a></
li>
<li><a class="text-muted" href="#signup" data-toggle="tab">Signup</
a></li>
</ul>
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
</div>
</div>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></
script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/
respond.min.js"></script>
<script src="assets/plugins/jquery-2.0.3.min.js"></script>
<script src="assets/plugins/bootstrap/js/bootstrap.js"></script>
<script src="assets/js/login.js"></script>
</body>
</html>
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
Step 8
Create a Home Page named home.php as in the following:
<?php
include_once('db_function.php');
if($_GET['logout']){
session_unset();
session_destroy();
}
if(!($_SESSION)){
header("Location:index.php");
} ?>
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
<head>
<meta charset="UTF-8" />
<title>Home | Home Page</title>
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<meta content="" name="description" />
<meta content="" name="author" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1”>
<link rel="stylesheet" href="assets/plugins/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" href="assets/plugins/Font-Awesome/css/font-
awesome.css" />
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
<link rel="stylesheet" href="assets/css/Offline.css" />
<link rel="stylesheet" href="assets/plugins/magic/magic.css" />
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/
html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/
respond.min.js"></script>
</head>
<body class="padTop53 ">
<div class="container">
<div class="col-lg-8 col-lg-offset-2 text-center">
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
<div class="logo">
<h1>Welcome!</h1>
<h3>Your name <?php echo $_SESSION['user_name'];?>!</h3>
<h1>Your email <?php echo $_SESSION['emailid'];?>!</h1>
</div>
<br />
<div class="col-lg-6 col-lg-offset-3">
<div class="btn-group btn-group-justified">
<a href="home.php?logout=1" class="btn btn-primary">Log Out</a>
</div>
</div></div> </div></body></html>
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
Step 9
After the preceding procedure has been done run your program. After
running it the following wil be the output screens.
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
1- Login Screen
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
2- Registration Screen
CREATE LOGIN AND REGISTRATION FORM IN
PHP USING OOP
3- Home Screen
ABOUT
Author name: parwiz “danyar”
Email : perwezdanyar@gmail.com

More Related Content

What's hot

Modul pratikum pbo - ENCAPSULATION
Modul pratikum pbo - ENCAPSULATIONModul pratikum pbo - ENCAPSULATION
Modul pratikum pbo - ENCAPSULATIONrahmantoyuri
 
Bank management system c++
Bank management system c++Bank management system c++
Bank management system c++Akshay Sorathia
 
Sql project presentation
Sql project presentationSql project presentation
Sql project presentationAnkur Raina
 
Core java complete ppt(note)
Core java  complete  ppt(note)Core java  complete  ppt(note)
Core java complete ppt(note)arvind pandey
 
Online flight booking srs document
Online flight booking srs documentOnline flight booking srs document
Online flight booking srs documentmanthankdesai
 
College management-system
College management-systemCollege management-system
College management-systemkarthik10435
 
Alumni Tracking Portal of Cagayan State University Lal lo Campus)
Alumni Tracking Portal of Cagayan State University Lal lo Campus)Alumni Tracking Portal of Cagayan State University Lal lo Campus)
Alumni Tracking Portal of Cagayan State University Lal lo Campus)Edenjoy Manuel
 
online leave management system
online leave management systemonline leave management system
online leave management systemgalaxykutti
 
Mobile store management
Mobile store management Mobile store management
Mobile store management Rupendra Verma
 
SPRING - MAVEN - REST API (ITA - Luglio 2017)
SPRING - MAVEN - REST API (ITA - Luglio 2017)SPRING - MAVEN - REST API (ITA - Luglio 2017)
SPRING - MAVEN - REST API (ITA - Luglio 2017)Valerio Radice
 
Java Programming for Designers
Java Programming for DesignersJava Programming for Designers
Java Programming for DesignersR. Sosa
 
Online student management system
Online student management systemOnline student management system
Online student management systemMumbai Academisc
 

What's hot (20)

Online help desk
Online help deskOnline help desk
Online help desk
 
Modul pratikum pbo - ENCAPSULATION
Modul pratikum pbo - ENCAPSULATIONModul pratikum pbo - ENCAPSULATION
Modul pratikum pbo - ENCAPSULATION
 
Bank management system c++
Bank management system c++Bank management system c++
Bank management system c++
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
 
Sql project presentation
Sql project presentationSql project presentation
Sql project presentation
 
EC-CUBE 4 入門
EC-CUBE 4 入門EC-CUBE 4 入門
EC-CUBE 4 入門
 
Core java complete ppt(note)
Core java  complete  ppt(note)Core java  complete  ppt(note)
Core java complete ppt(note)
 
Jdbc
JdbcJdbc
Jdbc
 
encapsulation
encapsulationencapsulation
encapsulation
 
Online flight booking srs document
Online flight booking srs documentOnline flight booking srs document
Online flight booking srs document
 
Encapsulation
EncapsulationEncapsulation
Encapsulation
 
College management-system
College management-systemCollege management-system
College management-system
 
Alumni Tracking Portal of Cagayan State University Lal lo Campus)
Alumni Tracking Portal of Cagayan State University Lal lo Campus)Alumni Tracking Portal of Cagayan State University Lal lo Campus)
Alumni Tracking Portal of Cagayan State University Lal lo Campus)
 
online leave management system
online leave management systemonline leave management system
online leave management system
 
Mobile store management
Mobile store management Mobile store management
Mobile store management
 
Servlets
ServletsServlets
Servlets
 
SPRING - MAVEN - REST API (ITA - Luglio 2017)
SPRING - MAVEN - REST API (ITA - Luglio 2017)SPRING - MAVEN - REST API (ITA - Luglio 2017)
SPRING - MAVEN - REST API (ITA - Luglio 2017)
 
Overview Of JDBC
Overview Of JDBCOverview Of JDBC
Overview Of JDBC
 
Java Programming for Designers
Java Programming for DesignersJava Programming for Designers
Java Programming for Designers
 
Online student management system
Online student management systemOnline student management system
Online student management system
 

Similar to Login and Registration form using oop in php

Creating a Simple PHP and MySQL-Based Login System
Creating a Simple PHP and MySQL-Based Login SystemCreating a Simple PHP and MySQL-Based Login System
Creating a Simple PHP and MySQL-Based Login SystemAzharul Haque Shohan
 
Form demoinplaywithmysql
Form demoinplaywithmysqlForm demoinplaywithmysql
Form demoinplaywithmysqlKnoldus Inc.
 
Practical PHP by example Jan Leth-Kjaer
Practical PHP by example   Jan Leth-KjaerPractical PHP by example   Jan Leth-Kjaer
Practical PHP by example Jan Leth-KjaerCOMMON Europe
 
User registration and login using stored procedure in php
User registration and login using stored procedure in phpUser registration and login using stored procedure in php
User registration and login using stored procedure in phpPHPGurukul Blog
 
Building scalable products with WordPress - WordCamp London 2018
Building scalable products with WordPress - WordCamp London 2018Building scalable products with WordPress - WordCamp London 2018
Building scalable products with WordPress - WordCamp London 2018Elliot Taylor
 
How to Create Login and Registration API in PHP.pdf
How to Create Login and Registration API in PHP.pdfHow to Create Login and Registration API in PHP.pdf
How to Create Login and Registration API in PHP.pdfAppweb Coders
 
ASP.Net, move data to and from a SQL Server Database
ASP.Net, move data to and from a SQL Server DatabaseASP.Net, move data to and from a SQL Server Database
ASP.Net, move data to and from a SQL Server DatabaseChristopher Singleton
 
17. CodeIgniter login simplu cu sesiuni
17. CodeIgniter login simplu cu sesiuni17. CodeIgniter login simplu cu sesiuni
17. CodeIgniter login simplu cu sesiuniRazvan Raducanu, PhD
 
04 Html Form Get Post Login System
04 Html Form Get Post Login System04 Html Form Get Post Login System
04 Html Form Get Post Login SystemGeshan Manandhar
 
Create a res tful services api in php.
Create a res tful services api in php.Create a res tful services api in php.
Create a res tful services api in php.Adeoye Akintola
 
Unit 3 - for php application Sessions.pptx
Unit 3  -  for php  application Sessions.pptxUnit 3  -  for php  application Sessions.pptx
Unit 3 - for php application Sessions.pptxmythili213835
 
Php update and delet operation
Php update and delet operationPhp update and delet operation
Php update and delet operationsyeda zoya mehdi
 

Similar to Login and Registration form using oop in php (20)

Creating a Simple PHP and MySQL-Based Login System
Creating a Simple PHP and MySQL-Based Login SystemCreating a Simple PHP and MySQL-Based Login System
Creating a Simple PHP and MySQL-Based Login System
 
Form demoinplaywithmysql
Form demoinplaywithmysqlForm demoinplaywithmysql
Form demoinplaywithmysql
 
Practical PHP by example Jan Leth-Kjaer
Practical PHP by example   Jan Leth-KjaerPractical PHP by example   Jan Leth-Kjaer
Practical PHP by example Jan Leth-Kjaer
 
User registration and login using stored procedure in php
User registration and login using stored procedure in phpUser registration and login using stored procedure in php
User registration and login using stored procedure in php
 
Tutorial_4_PHP
Tutorial_4_PHPTutorial_4_PHP
Tutorial_4_PHP
 
Tutorial_4_PHP
Tutorial_4_PHPTutorial_4_PHP
Tutorial_4_PHP
 
Tutorial_4_PHP
Tutorial_4_PHPTutorial_4_PHP
Tutorial_4_PHP
 
Tutorial_4_PHP
Tutorial_4_PHPTutorial_4_PHP
Tutorial_4_PHP
 
18.register login
18.register login18.register login
18.register login
 
Building scalable products with WordPress - WordCamp London 2018
Building scalable products with WordPress - WordCamp London 2018Building scalable products with WordPress - WordCamp London 2018
Building scalable products with WordPress - WordCamp London 2018
 
How to Create Login and Registration API in PHP.pdf
How to Create Login and Registration API in PHP.pdfHow to Create Login and Registration API in PHP.pdf
How to Create Login and Registration API in PHP.pdf
 
ASP.Net, move data to and from a SQL Server Database
ASP.Net, move data to and from a SQL Server DatabaseASP.Net, move data to and from a SQL Server Database
ASP.Net, move data to and from a SQL Server Database
 
17. CodeIgniter login simplu cu sesiuni
17. CodeIgniter login simplu cu sesiuni17. CodeIgniter login simplu cu sesiuni
17. CodeIgniter login simplu cu sesiuni
 
Php (1)
Php (1)Php (1)
Php (1)
 
PHP || [Student Result Management System]
PHP || [Student Result Management System]PHP || [Student Result Management System]
PHP || [Student Result Management System]
 
04 Html Form Get Post Login System
04 Html Form Get Post Login System04 Html Form Get Post Login System
04 Html Form Get Post Login System
 
Fcr 2
Fcr 2Fcr 2
Fcr 2
 
Create a res tful services api in php.
Create a res tful services api in php.Create a res tful services api in php.
Create a res tful services api in php.
 
Unit 3 - for php application Sessions.pptx
Unit 3  -  for php  application Sessions.pptxUnit 3  -  for php  application Sessions.pptx
Unit 3 - for php application Sessions.pptx
 
Php update and delet operation
Php update and delet operationPhp update and delet operation
Php update and delet operation
 

Recently uploaded

Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 

Recently uploaded (20)

Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 

Login and Registration form using oop in php

  • 2. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP This article makes it easy to learn and use functions and sessions. Look at the following procedure. Step 1 Create a database as in the following: Step 2 Create a table as in the following: CREATE TABLE IF NOT EXISTS `users` (     `id` int(11) NOT NULL AUTO_INCREMENT,  `username` varchar(30) NOT NULL,     `emailid` varchar(30) NOT NULL,  `password` varchar(30) NOT NULL,      PRIMARY KEY (`id`)   ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; 
  • 3. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP Step 3 Create a form named index.php as in the following: <!DOCTYPE html> <html lang="en”> <head> <meta charset="UTF-8" /> <title>Contact List | Login Page</title> <meta content="width=device-width, initial-scale=1.0" name="viewport" /> <meta content="" name="description" /> <meta content="" name="author" />
  • 4. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <!-- GLOBAL STYLES --> <!-- PAGE LEVEL STYLES --> <link rel="stylesheet" href="assets/plugins/bootstrap/css/ bootstrap.css" /> <link rel="stylesheet" href="assets/css/login.css" /> <link rel="stylesheet" href="assets/plugins/magic/magic.css" /> <!-- END PAGE LEVEL STYLES à </head> <body >
  • 5. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP <!-- PAGE CONTENT --> <div class="container"> <div class="text-center"> </div> <div class="tab-content"> <div id="login" class="tab-pane active"> <form action="index.php" method="post" class="form-signin"> <p class="text-muted text-center btn-block btn btn-primary btn-rect"> Enter your username and password </p> <input type="text" placeholder="E-mail" class="form-control" name="emailid" id="emailid"/>
  • 6. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP <input type="password" placeholder="Password" class="form-control" name="password" id="password_log"/> <button class="btn text-muted text-center btn-danger" type="submit" name="login">Sign in</button> </form> </div> <div id="forgot" class="tab-pane"> <form action="index.html" class="form-signin"> <p class="text-muted text-center btn-block btn btn-primary btn- rect">Enter your valid e-mail</p> <input type="email" required="required" placeholder="Your E-mail" class="form-control" /> <br />
  • 7. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP <button class="btn text-muted text-center btn-success" type="submit">Recover Password</ button> </form> </div> <div id="signup" class="tab-pane"> <form action="index.php" method="post" class="form-signin"> <p class="text-muted text-center btn-block btn btn-primary btn-rect">Please Fill Details To Register</p> <input type="email" placeholder="E-mail" class="form-control" name="emailid" id="emailid" required/> <input type="text" placeholder="Username" class="form-control" name="user_name" id="user_name" required/> <input type="password" placeholder="Password" class="form-control" name="password" id="password" required/>
  • 8. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP <input type="password" placeholder="Confirm Password" class="form-control" name="confirm_password" id="confirm_password" required/> <button class="btn text-muted text-center btn-success" type="submit" name="register">Register</button> </form> </div> </div> <div class="text-center"> <ul class="list-inline"> <li><a class="text-muted" href="#login" data-toggle="tab">Login</a></ li> <li><a class="text-muted" href="#signup" data-toggle="tab">Signup</ a></li>
  • 9. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP </ul> </div> </div> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> <script src="assets/plugins/jquery-2.0.3.min.js"></script> <script src="assets/plugins/bootstrap/js/bootstrap.js"></script> <script src="assets/js/login.js"></script> <!--END PAGE LEVEL SCRIPTS à </body> </html>
  • 10. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP Step 4 Create a config file named config.php as in the following: <?php       define("DB_HOST", 'localhost');       define("DB_USER", 'root');       define("DB_PASSWORD", '');       define("DB_DATABSE", 'mypratice');   ?> 
  • 11. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP Step 5 Make a database connection class. Create the file named dbConnect.php as in the following: <?php       class dbConnect {           function __construct() {               require_once('config.php');               $conn = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);               mysql_select_db(DB_DATABSE, $conn); 
  • 12. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP if(!$conn)// testing the connection               {                   die ("Cannot connect to the database");               }                return $conn;           }           public function Close(){               mysql_close();           }       }   ?>  
  • 13. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP Step 6 Make a Function class. Create the file named dbFunction.php as in the following: <?php   require_once 'dbConnect.php';   session_start();       class dbFunction {           function __construct() {               // connecting to database               $db = new dbConnect();;            }  
  • 14. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP function __destruct(){ } public function user_register($user_name, $emailid, $password){ $rs = mysql_query("insert into users(user_name, emailid, password) values('$user_name', '$emailid', '$password')"); return $rs; } public function login($emailid, $password){ $rs = mysql_query("select * from users where emailid = '". $emailid."' and password = '".$password."'"); $rw = mysql_fetch_array($rs); $no_rows = mysql_num_rows($rs);
  • 15. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP if($no_rows == 1){ $_SESSION['login'] == true; $_SESSION['idu'] = $rw['id']; $_SESSION['user_name'] = $rw['user_name']; $_SESSION['emailid'] = $rw['emailid']; return true; }else{ return false; } } public function is_user_exist($emailid){
  • 16. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP $rs = mysql_query("select * from users where emailid = '".$emailid."'"); $no_rows = mysql_num_rows($rs); if($no_rows > 0){ return true; }else{ return false; } } } ?>
  • 17. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP Step 7 After the preceding procedure use the Function in index.php as in the following: <?php require_once("db_function.php"); $funObj = new dbFunction(); // submit form for login user if(isset($_POST['login'])){ // get user name $emailid = htmlspecialchars($_POST['emailid']); // get password $password = htmlspecialchars($_POST['password']);
  • 18. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP $user = $funObj -> login($emailid, $password); if($user){ header("Location:home.php"); die(); }else{ echo "<script>alert('Your Email / Password Donot match.')</script>"; } } // submit form for registering user if(isset($_POST['register'])){
  • 19. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP // get user name $user_name = htmlspecialchars(mysql_real_escape_string($_POST['user_name'])); // get email $emailid = htmlspecialchars(mysql_real_escape_string($_POST['emailid'])); // get password $password = htmlspecialchars(mysql_real_escape_string($_POST['password'])); // get confirm password $confirm_password = htmlspecialchars(mysql_real_escape_string($_POST['confirm_password'])); if($password == $confirm_password){
  • 20. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP $email = $funObj -> is_user_exist($emailid); if(!$email){ $register = $funObj -> user_register($user_name, $emailid, $password); if($register){ echo "<script>alert('Registration Successful')</script>"; }else{ echo "<script>alert('Registration Not Successful')</script>"; }
  • 21. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP }else{ echo "<script>alert('Email Already Exist')</ script>"; } }else{ echo "<script>alert('Password Not Match')</ script>"; } } ?>
  • 22. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP <!DOCTYPE html> <html lang="en”> <head> <meta charset="UTF-8" /> <title>Contact List | Login Page</title> <meta content="width=device-width, initial-scale=1.0" name="viewport" / > <meta content="" name="description" /> <meta content="" name="author" />
  • 23. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP <link rel="stylesheet" href="assets/plugins/bootstrap/css/bootstrap.css" /> <link rel="stylesheet" href="assets/css/login.css" /> <link rel="stylesheet" href="assets/plugins/magic/magic.css" /> </head> <body > <div class="container"> <div class="text-center"> </div> <div class="tab-content">
  • 24. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP <div id="login" class="tab-pane active"> <form action="index.php" method="post" class="form-signin"> <p class="text-muted text-center btn-block btn btn-primary btn-rect"> Enter your username and password </p> <input type="text" placeholder="E-mail" class="form-control" name="emailid" id="emailid"/> <input type="password" placeholder="Password" class="form-control" name="password" id="password_log"/> <button class="btn text-muted text-center btn-danger" type="submit" name="login">Sign in</button>
  • 25. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP </form> </div> <div id="forgot" class="tab-pane"> <form action="index.html" class="form-signin"> <p class="text-muted text-center btn-block btn btn-primary btn- rect">Enter your valid e-mail</p> <input type="email" required="required" placeholder="Your E-mail" class="form-control" /> <br /> <button class="btn text-muted text-center btn-success" type="submit">Recover Password</button> </form>
  • 26. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP </div> <div id="signup" class="tab-pane"> <form action="index.php" method="post" class="form-signin"> <p class="text-muted text-center btn-block btn btn-primary btn- rect">Please Fill Details To Register</p> <input type="email" placeholder="E-mail" class="form-control" name="emailid" id="emailid" required/> <input type="text" placeholder="Username" class="form-control" name="user_name" id="user_name" required/> <input type="password" placeholder="Password" class="form-control" name="password" id="password" required/> <input type="password" placeholder="Confirm Password" class="form- control" name="confirm_password" id="confirm_password" required/>
  • 27. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP <button class="btn text-muted text-center btn-success" type="submit" name="register">Register</button> </form> </div> </div> <div class="text-center"> <ul class="list-inline"> <li><a class="text-muted" href="#login" data-toggle="tab">Login</a></ li> <li><a class="text-muted" href="#signup" data-toggle="tab">Signup</ a></li> </ul>
  • 28. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP </div> </div> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></ script> <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/ respond.min.js"></script> <script src="assets/plugins/jquery-2.0.3.min.js"></script> <script src="assets/plugins/bootstrap/js/bootstrap.js"></script> <script src="assets/js/login.js"></script> </body> </html>
  • 29. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP Step 8 Create a Home Page named home.php as in the following: <?php include_once('db_function.php'); if($_GET['logout']){ session_unset(); session_destroy(); } if(!($_SESSION)){ header("Location:index.php"); } ?>
  • 30. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP <head> <meta charset="UTF-8" /> <title>Home | Home Page</title> <meta content="width=device-width, initial-scale=1.0" name="viewport" /> <meta content="" name="description" /> <meta content="" name="author" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1”> <link rel="stylesheet" href="assets/plugins/bootstrap/css/bootstrap.css" /> <link rel="stylesheet" href="assets/plugins/Font-Awesome/css/font- awesome.css" />
  • 31. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP <link rel="stylesheet" href="assets/css/Offline.css" /> <link rel="stylesheet" href="assets/plugins/magic/magic.css" /> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/ html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/ respond.min.js"></script> </head> <body class="padTop53 "> <div class="container"> <div class="col-lg-8 col-lg-offset-2 text-center">
  • 32. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP <div class="logo"> <h1>Welcome!</h1> <h3>Your name <?php echo $_SESSION['user_name'];?>!</h3> <h1>Your email <?php echo $_SESSION['emailid'];?>!</h1> </div> <br /> <div class="col-lg-6 col-lg-offset-3"> <div class="btn-group btn-group-justified"> <a href="home.php?logout=1" class="btn btn-primary">Log Out</a> </div> </div></div> </div></body></html>
  • 33. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP Step 9 After the preceding procedure has been done run your program. After running it the following wil be the output screens.
  • 34. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP 1- Login Screen
  • 35. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP 2- Registration Screen
  • 36. CREATE LOGIN AND REGISTRATION FORM IN PHP USING OOP 3- Home Screen
  • 37. ABOUT Author name: parwiz “danyar” Email : perwezdanyar@gmail.com