Improved and Still Simple Login and Logout using PHP

Language

Try this out, this is still a Simple Login and Logout and Viewing of data in a database in PHP BUT it also stretch its scope to cookies. I've included cookie for educational purposes and for those who want to be educated about it. how to run it: 1. first you need to extract the sample.zip. 2. put the folder in the htdocs folder of your xammp folder. 3. import the sample.sql in your phpmyadmin. 4. then run the file in your browser like localhost/sample/index.php 5. then login with this preferences: username: admin password: admin Other things connected with this project will be uploaded. Learn and enjoy! Please leave comments for more improvement of this project. Thank You! -Espionage-

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

Comments

Submitted byAnonymous (not verified)on Wed, 02/06/2013 - 14:48

i used the login form its nice of using it
Submitted byAnonymous (not verified)on Sun, 04/07/2013 - 21:34

Heya are using Wordpress for your site platform? I'm new to the blog world but I'm trying to get started and set up my own. Do you need any html coding knowledge to make your own blog? Any help would be greatly appreciated!
Submitted byjmmaguigadon Tue, 10/22/2013 - 18:38

just check the configuration or the database connection file then see the name of the database there, after that go to your phpmyadmin then make your database. After making your database, import the sql file. If you still have error, pm me. [email protected].
Submitted bymark005 (not verified)on Fri, 01/10/2014 - 00:10

Hi poh pwede pa ask if alam nyo po kung pano e destroy yng log out?kasi im using CMS for my project eh..I use prestashop pero kung e click m yung log-out..nka log-out kna. pero kung e click m yung back sa browser..bumbalik pa din sa page before you log-out.

check mo ito na solution: basis mo na ito:
  1. <?php
  2. session_start();
  3. if (!isset($_SESSION['admin_username']) && (trim($_SESSION['admin_username']) == '')) { //checking session
  4. header("location:../monitoring-me/includes/authenticationerror.php"); //redirect to err page
  5. exit();
  6. }
  7. ?>
--> The code above prevents illegal access to your page guarded by this piece of code, thus kung di naregister and session na needed di ka makakaaccess sa page. dapat ganun ang gawin mo dun sa mga pages na gusto mo na di na maacess, lagay ka lang ng include file that holds that code sa top ng codes mo then dapat magwork na yun. Hope this helps you.

Add new comment