Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

PHP Tutorial: Professional Login System v2 (Part 3)

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
9,551
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Feb 11, 2010

Download Tutorial Files
http://www.phpvault.net

Create a professional php login system using Object Oriented Programming. OOP is the practical and common method of creating advanced and secure php applications. I will be uploading more tutorials so subscribe to my channel. Thanks.

  • likes, 2 dislikes

Link to this comment:

Share to:

Uploader Comments (phpclass)

  • I find a bug into your class.login.php. if you use a development server and enabled the php errors and warnings you will get a undefined token error. Because in the constructor you define the token : $this->_token = $_POST['token']; So if your creating a new file and initialise the login class you will get the post error because it's not existing var... so what I did to fix this little bug is change the token definition to :

    $this->_token = isset($_POST['token']);

  • @domentarion Thank you for the comment. I think you might have misunderstood what the POST variable token does. The POST token variable is a randomly generated value used to validate if a form submission is unique during the current session. Your code suggestion only checks if any token value has been submitted. You actually need to generate a unique value during the current session and then validate that it came from the same session.

  • @domentarion $this->_token = isset($_POST['token']); actually gives you a TRUE or FALSE value. This is flawed because I can easily submit data from a form on another domain and your code will accept it. The code that I put for download didn't have any bugs when I tested it. So it should be fine. Let me know if you still have trouble. Thanks.

  • @domentarion Try using this line of code

    $this->_token = isset($_POST['token'])? $_POST['token'] : 0;

  • when i try to login PHP_SELF is not working. what seems to be the problem??

  • Can you give me more details about your problem. This script should be working properly.

see all

All Comments (53)

Sign In or Sign Up now to post a comment!
  • i was wondering that too.......

  • while ERROR like this

    Warning: Invalid argument supplied for foreach() in class.login.php on line xxx

  • how do you log out?

  • I downloaded the example and is not working.

  • i see all the videos bt in end i got result

    "Forbidden You don't have permission to access /user(its folder name)/< on this server."

    so wht's the problem.

    i see the videos again and again but show again same error. totaly confuss.

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more