Improved and Still Simple Login and Logout using PHP

Submitted by: 
Language: 
Visitors have accessed this post 7992 times.

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

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.

#JM Maguigad, PHP and VB 6 System Developer/Freelance Programmer
#Contact Infos: [email protected] or 09752276378

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].

#JM Maguigad, PHP and VB 6 System Developer/Freelance Programmer
#Contact Infos: [email protected] or 09752276378

i didnt know i cant run the... sql or the database of it..>.<

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!

you can't stay away from html, html is needed because it forms the physical part of your site. I used dreamweaver or notepad++.

#JM Maguigad, PHP and VB 6 System Developer/Freelance Programmer
#Contact Infos: [email protected] or 09752276378

i used the login form its nice of using it

thank you for the appreciation of my work.

#JM Maguigad, PHP and VB 6 System Developer/Freelance Programmer
#Contact Infos: [email protected] or 09752276378

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • You may insert videos with [video:URL]
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <th> <img> <h1> <h2> <h3> <iframe> [video]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.