diff --git a/README.md b/README.md index 42f5c8a..df69ce2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,243 @@ -# Complete-Login-and-Registration-System-in-PHP-and-MYSQLI +

+ +

-## Detailed Readme incoming in 2 weeks, if u get stuck at something, stay tuned till then! +> A complete PHP Login and Registration System with Profile editing & authentication System + +# Table of Contents + +* [Installation](#installation) + * [Requirements](#requirements) + * [Installation Steps](#installation-steps) + * [Getting Started](#getting-started) +* [Features](#Features) +* [Components](#Components) + * [Languages](#Languages) + * [Development Environment](#Development-Environment) + * [Database](#database) + * [DBMS](#DBMS) + * [API](#api) + * [Frameworks and Libraries](#Frameworks-and-Libraries) + * [External PLugins](#external-plugins) +* [Details](#details) +* [View KLiK, The Complete Project](#klik-social-media-website) + + + +## Installation + +#### Requirements +* PHP +* Apache server +* MySQL Database +* SQL + +> All of these requirements can be completed at once by simply installing a server stack like `Wamp` or `Xampp` + +#### Installation Steps +1. Import the `DBcreation.sql` file in the `includes` folder into phpMyAdmin. There is no need for any change in the .sql file. This will create the database required for the application to function. + +2. Edit the `dbh.inc.php` file in the `includes` folder to create the database connection. Change the password and username to the ones being used within `phpMyAdmin`. There is no need to change anything else. + +```php +$serverName = "localhost"; +$dBUsername = "root"; +$dBPassword = "examplePassword"; +$dBName = "loginsystem"; + +$conn = mysqli_connect($serverName, $dBUsername, $dBPassword, $dBName, 3307); + +if (!$conn) +{ + die("Connection failed: ". mysqli_connect_error()); +} +``` +> The port number does not need to be changed under normal circumstances, but if you are running into a problem or the server stack is installed on another port, feel free to change it, but do so carefully. + +3. Edit the `email-server.php` file in the `includes` folder and change the variables accordingly: + + * `$SMTPuser` : email address on `gmail` + * `$SMTPpwd` : email address password + * `SMTPtitle` : hypothetical company's name + +```php +$SMTPuser = 'klik.official.website@gmail.com'; +$SMTPpwd = 'some-example-password'; +$SMTPtitle = "KLiK inc."; +``` +> This step is mainly for setting up an email account to enable the `contact` and `password reset system`, all of which require mailing. + +#### Getting started +The database already contains two pre-made accounts for you to explore around with. If not sufficient, head over to the `signup page` and start making new accounts. +##### Existing Accounts: +``` +username: admin +password: admin +``` +``` +username: user +password: user +``` + +> **Note:** The GUI files are in the `root directory`, and the `backend files` are present in the `includes` folder. The main HTML structuring files are the `HTML-head.php` and `HTML-footer.php`, which also reside in the includes folder + +## Features + +* [Registration / Signup System](#registration-signup-system) +* [Login System](#login-system) +* [Profile System](#profile-system) +* [Profile Editing System](#profile-editing-system) +* [Contact System](#contact-system) + + +## Components + +#### Languages +``` +PHP 5.6.40 +SQL 14.0 +HTML5 +CSS3 +``` + +#### Development Environment +``` +WampServer Stack 3.0.6 +Windows 10 +``` + +#### Database +``` +MySQL Database 8.0.13 +``` + +#### DBMS +``` +phpMyAdmin 4.8.3 +``` + +#### API +``` +MySQLi APIs +``` + +#### Frameworks and Libraries +``` +BootStrap v4.2.1 +``` + +#### External Plugins +``` +[PHPMailer 6.0.6](https://github.com/PHPMailer/PHPMailer) +``` +> This was used for creating a `mail server` on `Windows localhost`, since there is not one like in Linux. This plugin was used for the sending and receiving of emails on localhost, this is not needed on a live domain + +## Details + +> Details of important Features of the Application + +### Registration / Signup System + +* A `status icon` in the top left corner shows online or logged out status +* registration is done through the `signup` page. +* `username` cannot be changed after signing up, since i thought it would be an exploitable weakness +* `email` required for registration. +* Password needs to be re-entered for additional confirmation +* Passwords `encrypted` before being stored in database so even owners donot have access to them +* User can set a `profile image` at signup. In case they dont, their profile image is set to a default image. + +> currently the upload image button does not give a visible response on clicking and uploading an image, but it does work. It is purely a design matter and not a back-end issue + +* There are also additional information fields that are `optional`, i.e; a user can signup without setting them. +* Optional fields are `gender`, `full name`, `profile headline` and `bio` +* Implemented several `authentication methods` to verify user info before registering him. +* Authentication checks for: + * `empty fields` + * `invalid username or email` + * `password mismatch` + * `wrong profile image error` + * `SQL errors` + * `internal server errors` + +### Login System + +* `username` and `password` required for logging in. +* Authentication checks to return valid error messages. +* Authentication checks for: + * `wrong username` + * `wrong password` + +### Profile System + +* Each is assigned a `user profile` on registration. +* Profile can be accessed through the `menu options` which become visible after logging in or the `link` beneath the profile image on the right. +* Profile page displays all of the User's information, except (naturally) for the password. +* Displayed information: + * `profile image` + * `username` + * `full name` + * `gender` + * `headline` + * `bio` +* Profile page cannot be accessed without logging in. +* Signup page cannot be page `after logging in`. + +### Profile Editing System + +* User can edit his profile information with the help of the `profile editing system` +* Profile Editing page can be accessed from `menu option` or `link` below profile image on the right +* `username` cannot be changed +* Profile Editing already has the existing information so user does not have to type everything all over again if he merely wishes to slightly edit current information. +* Current password required for changing password. +* Changing password also requires confirmation / re-entering of new password. +* user profile image can also be changed. +* Authentication checks for: + * `empty fields` + * `invalid information` + * `wrong current password` + * `new password mismatch` + * `image upload errors` + +### Contact System + +* contact system is accessible with or without logging in +* uses `PHPMailer` to create an email server with which it sends emails. +* options for subscribing to newsletter (or basically any additional option for contacting) +* does not require PHPMailer on live domain (only required on windows localhost) + +### Security + +* `Password hashing` before storing in database. +* Filtering of information obtained from `$_GET` and `$_POST` methods to prevent `header injection`. +* Implementation of `MySQLi Prepared Statements` for **advanced** database security. + + **Example:** +```php +$sql = "select uidUsers from users where uidUsers=?;"; + $stmt = mysqli_stmt_init($conn); + if (!mysqli_stmt_prepare($stmt, $sql)) + { + header("Location: ../signup.php?error=sqlerror"); + exit(); + } + else + { + mysqli_stmt_bind_param($stmt, "s", $userName); + mysqli_stmt_execute($stmt); + mysqli_stmt_store_result($stmt); + } +``` + +### KLiK - Social Media Website + +Check out the complete project for this login system. [KLiK](https://github.com/msaad1999/KLiK-SocialMediaWebsite) is a complete Social Media website, along with a Complete Login/Registration system, Profile system, Chat room, Forum system and Blog/Polls/Event Management System. + +> Check out [KLiK here](https://github.com/msaad1999/KLiK-SocialMediaWebsite) + +

+ +

+ +> Do star my projects! :) + +> If you liked my work, please show support by `starring` the repository! It means a lot to me, and is all im asking for. diff --git a/_git assets/cover.png b/_git assets/cover.png new file mode 100644 index 0000000..f56537c Binary files /dev/null and b/_git assets/cover.png differ diff --git a/_git assets/klik.png b/_git assets/klik.png new file mode 100644 index 0000000..c7ab502 Binary files /dev/null and b/_git assets/klik.png differ diff --git a/contact.php b/contact.php index bfd136a..2a9bdb9 100644 --- a/contact.php +++ b/contact.php @@ -1,6 +1,8 @@ +
@@ -18,7 +20,6 @@ require 'PHPMailer/src/SMTP.php'; - // check for header injection function has_header_injection($str){ return preg_match('/[\r\n]/',$str); } @@ -30,9 +31,8 @@ function has_header_injection($str){ $msg = $_POST['message']; - // check if name / mail (fields) have header injection if (has_header_injection($name) || has_header_injection($email)){ - die(); // kill the script immediately + die(); } if (! $name || ! $email || ! $msg){ @@ -41,70 +41,49 @@ function has_header_injection($str){ exit; } - - - // add the recipient email to a variable - $to = "saad01.1999@gmail.com"; - - // create a subject $subject = "$name sent you a message via your contact form"; - // create message $message = "Name: $name
" # \r\n is a line break . "Email: $email

" . "Message:

$msg"; - // check if subscribe checkbox was checked if (isset($_POST['subscribe'])){ - // add new line to message variable $message .= "


" . "IMPORTANT: Please add $email " . "to your mailing list.
"; } - // send the email (used PHPMailer since mail() does not send email on localhost in WIINDOWS $mail = new PHPMailer(true); try { - //Server settings - //$mail->SMTPDebug = 2; // Enable verbose debug output - - $mail->isSMTP(); // Set mailer to use SMTP - $mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP servers - $mail->SMTPAuth = true; // Enable SMTP authentication - $mail->Username = $to; // SMTP username - $mail->Password = 'test123'; // SMTP password - $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted - $mail->Port = 587; // TCP port to connect to + $mail->isSMTP(); + $mail->Host = 'smtp.gmail.com'; + $mail->SMTPAuth = true; + $mail->Username = $SMTPuser; + $mail->Password = $SMTPpwd; + $mail->SMTPSecure = 'tls'; + $mail->Port = 587; - //Recipients - $mail->setFrom($to, "Franklin's Fine Dining"); - $mail->addAddress($to, "Franklin's Fine Dining"); // Add a recipient + $mail->setFrom($SMTPuser, $SMTPtitle); + $mail->addAddress($SMTPuser, $SMTPtitle); - //Content - $mail->isHTML(true); // Set email format to HTML + $mail->isHTML(true); $mail->Subject = $subject; $mail->Body = $message; $mail->send(); } catch (Exception $e) { - echo '

Message could not be sent. Mailer Error: '. $mail->ErrorInfo - .'

'; + echo '

Message could not be sent. Mailer Error: '. $mail->ErrorInfo + .'

'; } - + + echo "
Thanks for contacting Franklin's!
+
Please Allow 24 hours for a response
"; + } ?> - -
Thanks for contacting Franklin's!
-

Please Allow 24 hours for a response

-

« Go To Home Page

- - - - -
@@ -124,8 +103,6 @@ function has_header_injection($str){
- -
diff --git a/dish.php b/dish.php deleted file mode 100644 index 2483a5b..0000000 --- a/dish.php +++ /dev/null @@ -1,33 +0,0 @@ - - -
- -
-

$

-

-
-

Suggested Beverage:

-

Suggested tip: $

-
- -
- - - - - - diff --git a/img/200.png b/img/200.png new file mode 100644 index 0000000..9960203 Binary files /dev/null and b/img/200.png differ diff --git a/img/banner.png b/img/banner.png index a82c2a0..9fee2d9 100644 Binary files a/img/banner.png and b/img/banner.png differ diff --git a/img/carlos.png b/img/carlos.png deleted file mode 100644 index 5314031..0000000 Binary files a/img/carlos.png and /dev/null differ diff --git a/img/favicon.png b/img/favicon.png new file mode 100644 index 0000000..7f74d51 Binary files /dev/null and b/img/favicon.png differ diff --git a/img/francis.png b/img/francis.png deleted file mode 100644 index 9f30f99..0000000 Binary files a/img/francis.png and /dev/null differ diff --git a/img/john.png b/img/john.png deleted file mode 100644 index f18be91..0000000 Binary files a/img/john.png and /dev/null differ diff --git a/img/login.png b/img/login.png new file mode 100644 index 0000000..54cbe9c Binary files /dev/null and b/img/login.png differ diff --git a/img/logout.png b/img/logout.png new file mode 100644 index 0000000..3dc3246 Binary files /dev/null and b/img/logout.png differ diff --git a/includes/StoreHours.class.php b/includes/StoreHours.class.php deleted file mode 100644 index 378948e..0000000 --- a/includes/StoreHours.class.php +++ /dev/null @@ -1,336 +0,0 @@ -exceptions = $exceptions; - $this->config = $config; - $this->yesterdayFlag = false; - - $weekdayToIndex = array( - 'mon' => 1, - 'tue' => 2, - 'wed' => 3, - 'thu' => 4, - 'fri' => 5, - 'sat' => 6, - 'sun' => 7 - ); - - $this->hours = array(); - - foreach ($hours as $key => $value) { - $this->hours[$weekdayToIndex[$key]] = $value; - } - - // Remove empty elements from values (backwards compatibility) - foreach ($this->hours as $key => $value) { - $this->hours[$key] = array_filter($value, function($element) - { - return (trim($element) !== ''); - }); - } - - // Remove empty elements from values (backwards compatibility) - foreach ($this->exceptions as $key => $value) { - $this->exceptions[$key] = array_filter($value, function($element) - { - return (trim($element) !== ''); - }); - } - - $defaultConfig = array( - 'separator' => ' - ', - 'join' => ' and ', - 'format' => 'g:ia', - 'overview_weekdays' => array( - 'Mon', - 'Tue', - 'Wed', - 'Thu', - 'Fri', - 'Sat', - 'Sun' - ) - ); - - $this->config += $defaultConfig; - - } - - /** - * - * @param string $timestamp - * @return boolean - */ - private function is_open_at($timestamp = null) - { - - $timestamp = (null !== $timestamp) ? $timestamp : time(); - $is_open = false; - - $this->yesterdayFlag = false; - - // Check whether shop's still open from day before - $ts_yesterday = strtotime(date('Y-m-d H:i:s', $timestamp) . ' -1 day'); - $yesterday = date('Y-m-d', $ts_yesterday); - $hours_yesterday = $this->hours_today_array($ts_yesterday); - - foreach ($hours_yesterday as $range) { - $range = explode('-', $range); - $start = strtotime($yesterday . ' ' . $range[0]); - $end = strtotime($yesterday . ' ' . $range[1]); - if ($end <= $start) { - $end = strtotime($yesterday . ' ' . $range[1] . ' +1 day'); - } - if ($start <= $timestamp && $timestamp <= $end) { - $is_open = true; - $this->yesterdayFlag = true; - break; - } - } - - // Check today's hours - if (!$is_open) { - - $day = date('Y-m-d', $timestamp); - $hours_today_array = $this->hours_today_array($timestamp); - - foreach ($hours_today_array as $range) { - $range = explode('-', $range); - $start = strtotime($day . ' ' . $range[0]); - $end = strtotime($day . ' ' . $range[1]); - if ($end <= $start) { - $end = strtotime($day . ' ' . $range[1] . ' +1 day'); - } - if ($start <= $timestamp && $timestamp <= $end) { - $is_open = true; - break; - } - } - - } - - return $is_open; - - } - - /** - * - * @param array $ranges - * @return string - */ - private function format_hours(array $ranges) - { - - $hoursparts = array(); - - foreach ($ranges as $range) { - $day = '2016-01-01'; - - $range = explode('-', $range); - $start = strtotime($day . ' ' . $range[0]); - $end = strtotime($day . ' ' . $range[1]); - - $hoursparts[] = date($this->config['format'], $start) . $this->config['separator'] . date($this->config['format'], $end); - } - - return implode($this->config['join'], $hoursparts); - - } - - /** - * - * @param string $timestamp - * @return array today's hours as array - */ - private function hours_today_array($timestamp = null) - { - - $timestamp = (null !== $timestamp) ? $timestamp : time(); - $today = strtotime(date('Y-m-d', $timestamp) . ' midnight'); - $weekday_short = date('N', $timestamp); - $hours_today_array = array(); - - if (isset($this->hours[$weekday_short])) { - $hours_today_array = $this->hours[$weekday_short]; - } - - foreach ($this->exceptions as $ex_day => $ex_hours) { - if (strtotime($ex_day) === $today) { - // Today is an exception, use alternate hours instead - $hours_today_array = $ex_hours; - } - } - - return $hours_today_array; - - } - - /** - * - * @return array - */ - private function hours_this_week_simple() - { - - $lookup = array_combine(range(1, 7), $this->config['overview_weekdays']); - $ret = array(); - - for ($i = 1; $i <= 7; $i++) { - $hours_str = (isset($this->hours[$i]) && count($this->hours[$i]) > 0) ? $this->format_hours($this->hours[$i]) : '-'; - - $ret[$lookup[$i]] = $hours_str; - } - - return $ret; - - } - - /** - * - * @return array - */ - private function hours_this_week_grouped() - { - $lookup = array_combine(range(1, 7), $this->config['overview_weekdays']); - $blocks = array(); - - // Remove empty elements ("closed all day") - $hours = array_filter($this->hours, function($element) - { - return (count($element) > 0); - }); - - foreach ($hours as $weekday => $hours2) { - foreach ($blocks as &$block) { - if ($block['hours'] === $hours2) { - $block['days'][] = $weekday; - continue 2; - } - } - unset($block); - $blocks[] = array( - 'days' => array( - $weekday - ), - 'hours' => $hours2 - ); - } - - // Flatten - $ret = array(); - foreach ($blocks as $block) { - // Format days - $keyparts = array(); - $keys = $block['days']; - $buffer = array(); - $lastIndex = null; - $minGroupSize = 3; - - foreach ($keys as $index) { - if ($lastIndex !== null && $index - 1 !== $lastIndex) { - if (count($buffer) >= $minGroupSize) { - $keyparts[] = $lookup[$buffer[0]] . '-' . $lookup[$buffer[count($buffer) - 1]]; - } else { - foreach ($buffer as $b) { - $keyparts[] = $lookup[$b]; - } - } - $buffer = array(); - } - $buffer[] = $index; - $lastIndex = $index; - } - if (count($buffer) >= $minGroupSize) { - $keyparts[] = $lookup[$buffer[0]] . '-' . $lookup[$buffer[count($buffer) - 1]]; - } else { - foreach ($buffer as $b) { - $keyparts[] = $lookup[$b]; - } - } - // Combine - $ret[implode(', ', $keyparts)] = $this->format_hours($block['hours']); - } - - return $ret; - - } - - /** - * - * @return string - */ - public function is_open() - { - - return $this->is_open_at(); - - } - - /** - * - * @return string - */ - public function hours_today() - { - - $hours_today = $this->hours_today_array(); - return $this->format_hours($hours_today); - - } - - /** - * - * @return array - */ - public function hours_this_week($groupSameDays = false) - { - - return (true === $groupSameDays) ? $this->hours_this_week_grouped() : $this->hours_this_week_simple(); - - } - -} diff --git a/includes/arrays.php b/includes/arrays.php index 898808e..99f10c6 100644 --- a/includes/arrays.php +++ b/includes/arrays.php @@ -6,14 +6,6 @@ slug => "index.php", title => "Home" ), - array( - slug => "team.php", - title => "Our Team" - ), - array( - slug => "menu.php", - title => "Our Menu" - ), array( slug => "contact.php", title => "Contact Us" @@ -21,85 +13,12 @@ ); $navItems_signedin = array( + array( + slug => "profile.php", + title => "My Profile" + ), array( slug => "edit-profile.php", title => "Edit Profile" ), - ); - - // Team Members - $teamMembers = array( - array( - name => "John Smith", - position => "Owner", - bio => "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do " - . "eiusmod tempor incididunt ut labore et dolore magna aliqua", - img => 'john' - ), - array( - name => "Francis", - position => "General Manager", - bio => "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do " - . "eiusmod tempor incididunt ut labore et dolore magna aliqua", - img => 'francis' - ), - array( - name => "Carlos", - position => "Head Chef", - bio => "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do " - . "eiusmod tempor incididunt ut labore et dolore magna aliqua", - img => 'carlos' - ), - ); - - // Menu items - $menuItems = array( - - 'club-sandwich' => array( - title => "Club Sandwich", - price => 11, - blurb => "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut - labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris - nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate - velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non - proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", - drink => "Club Soda" - ), - - 'dill-salmon' => array( - title => "Lemon & Dill Salmon", - price => 18, - blurb => "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut - labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris - nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate - velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non - proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", - drink => "Fancy Wine" - ), - - 'super-salad' => array( - title => "The Super Salad®", - price => 34, - blurb => "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut - labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris - nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate - velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non - proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", - drink => "Jug O' Water" - ), - - 'mexican-barbacoa' => array( - title => "Mexican Barbacoa", - price => 23, - blurb => "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut - labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris - nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate - velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non - proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", - drink => "Beer with a Lime" - ), - - ); - - -?> \ No newline at end of file + ); \ No newline at end of file diff --git a/includes/copyright.php b/includes/copyright.php index c4de8b6..86c2f7a 100644 --- a/includes/copyright.php +++ b/includes/copyright.php @@ -1,2 +1,12 @@ -

PhP Demo Website - msaad1999

-
Copyright © Muhammad Saad Hussaini , Freelance Web Developer at Fiverr.com
\ No newline at end of file + + +

PHP Login/Registration System - msaad1999

+
Copyright © + + msaad1999, + Freelance Web Developer at + + Fiverr.com + +
+ diff --git a/includes/dbh.inc.php b/includes/dbh.inc.php index 2736a95..78e3efc 100644 --- a/includes/dbh.inc.php +++ b/includes/dbh.inc.php @@ -2,7 +2,7 @@ $serverName = "localhost"; $dBUsername = "root"; -$dBPassword = "test123"; +$dBPassword = "eldererajinMenji99"; $dBName = "loginsystem"; $conn = mysqli_connect($serverName, $dBUsername, $dBPassword, $dBName, 3307); @@ -11,5 +11,3 @@ { die("Connection failed: ". mysqli_connect_error()); } - - diff --git a/includes/email-server.php b/includes/email-server.php new file mode 100644 index 0000000..fe3e60c --- /dev/null +++ b/includes/email-server.php @@ -0,0 +1,6 @@ + Location
- Isalamabad Asia
- honululu, IS + ThePizzaVillage, PizzaTown
+ Jupiter, Milky Way
@@ -22,8 +22,6 @@ Sunday - Monday
Closed

- -
diff --git a/includes/header.php b/includes/header.php index a90c1ef..b3de3ca 100644 --- a/includes/header.php +++ b/includes/header.php @@ -1,9 +1,9 @@ <?php echo TITLE; ?> - + + + '; + } + else + { + echo ''; + } + + ?>
@@ -31,20 +44,15 @@ function strip_bad_chars( $input ){ if(isset($_SESSION['userId'])) { - echo' -

' . strtoupper($_SESSION['userUid']) . '

- My Profile -
- -
'; - - echo '
you are logged in

'; + echo'
+ +

' . strtoupper($_SESSION['userUid']) . '

+ + +
'; } else { - echo '

Login

'; - - if(isset($_GET['error'])) { if($_GET['error'] == 'emptyfields') @@ -72,8 +80,6 @@ function strip_bad_chars( $input ){ '; - echo '

you are logged out

'; - } ?> @@ -84,7 +90,7 @@ function strip_bad_chars( $input ){