PHP OOP Login/Register System: Checking Signed In (Part 17/23)

preview_player
Показать описание

Official site

Twitter
Рекомендации по теме
Комментарии
Автор

this is a complexe oop programme which i wished it was explained in details ! this is dope ! it takes a lot to understand.

oussamaboumhaout
Автор

I don't know weather to complain about not uploading faster or thank you for making awesome tutorials.. but, at least I bought your book, so I got something useful to do, while waiting.. ;)

theswedishshemale
Автор

You are the Best! thanks you very much for all tutorials may god bless you!

yaokouassi
Автор

3:00 5:00 you forgot to actually process logout in the next lesson.
I just added $this->logout( );
because we later create this function within the class.

Tuttigiu
Автор

Solved this problem as follows : if you clear browsing data makes the page go back to the beginning . which asks if { You need to log in or register }

emilioqueiros
Автор

It seems like $this->find(user) will always be true, therefore, there is no need for that if statement in the __construct function.  The user can't tamper with $_SESSION['session_name'] so it will always be valid.  It can be true when a user is defined because it might lead to a user that hasn't been created.

tigergoldfish
Автор

On line 20, you added //process logout and mentioned we would get back to it but you never expounded on how to process the logout. Do we just call $this->logout(); ?

Eucadian
Автор

You do you make such huge pauses betweet videos of some series?

DeividasGedgaudas
Автор

Hi, my question is.you had created singleton class then why you created 3 'user' objects in login, register, logout page. Instead you can take one 'user' object and just call the methods which is required as you have did with other classes like redirect, input, hash, etc, ...

arshadsyed
Автор

The code only runs the second time for some reason. For example if I log in and it works, I would have to type in the code twice for some reason.

Henrylichannel
Автор

brother which s/w are you using for mysql where you delete sessions?

ankitkohli
Автор

One thing I noticed is that if the user has id 0 in the database then it wont log the user in, was looking through the code for about half hour for the bug until I came up with the idea to change the id in the database.

Rolandd
Автор

I'm getting an error:
Fatal error: Uncaught exception 'PDOException' with message 'You cannot serialize or unserialize PDO instances' in [no active file] on line 0
PDOException: You cannot serialize or unserialize PDO instances in [no active file] on line 0

can someone tell what should I do to solve this? I checked the code many times, and it's the same that Alex wrote, but I still get the error!

GachoKNS
Автор

so im at around min 7 and i get the correct results but i also get "Fatal error: Uncaught exception 'PDOException' with message 'You cannot serialize or unserialize PDO instances' in [no active file]:0 Stack trace: #0 [internal function]: PDO->__sleep() #1 {main} thrown in [no active file] on line 0"   any thoughts....i already tried clearing the cookies and trying again....thanks

smanunta
Автор

if I want to make two different users to login in the same login form with two separate table for each user which will be one for the student and the other for admin what i should I do in this case?

i made them login but i can't fetch their information with one same session so i created another session for the other user and still the same issue any suggestions please do i need to create user class for both users?

nabilabdulrahman
Автор

after user loggs in it doesnt redirects..even i write fuill header code, without using func.. it outputs error message if i add it instead of redirect..

GwidazMan
Автор

Another error here : Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 130968 bytes) in on line 140

Mchaker
Автор

im using chrome browser, i cant go to how do i do it?

junreyongcol
Автор

Hi all, I am having following problem...
when i try to access username from index.php page it shows following error..
Trying to get property of non-object in on line 8..

my code:
$user = new User();
echo $user->data()->username;

please get me out of this error..

Автор

Did anyone have an issue with the token not matching in login in the last lesson? I can't go on to this one  until I resolve it. Any help appreciated :)

paulclarke