Query ("SELECT * from developers where username=". $POST [' username ']. "and password=". $_post[' password ']. ""); if ($select) { $_session[' admin ']=$_post[' username '); $this->redirect (' Index/index ', ', 2, ' user '. $_post[' Username ']. ' Login Successful! '); } else{$this->redirect (' Index/index ', ' ', 2, ' username or password incorrect ');}} else{ $this->redirect (' Index/index ', ', 2, ' username or password cannot be empty! ');}} $this->display ();}}? >
I do not fill in the prompt my user name or password is incorrect, I fill in the correct also prompt me user name or password is not correct, do not know which problem, ask for answers.
Reply to discussion (solution)
TP has its own form verification method, why not?
If you still need to write your own base code in the framework, what do you do with frames?
Only logical hints will cause you to be prompted with an incorrect password. There's no reason for that.
Either there is a problem with the post data, or there is a problem with the SQL. Print out post data and SQL statements to see.