xxreenaxx1 Posted February 1, 2011 Share Posted February 1, 2011 My code work and let me log in but whether the login is correct or not it keeps on displaying "Wrong username and password" if($count==1){ session_register("myusername"); session_register("mypassword"); header("location:login_success.php"); } else { echo "Wrong Username or Password"; } Link to comment https://forums.phpfreaks.com/topic/226341-error-message/ Share on other sites More sharing options...
kenrbnsn Posted February 1, 2011 Share Posted February 1, 2011 Add the line <?php exit(); ?> after the "header" line. The use of session_register is highly discouraged. Please read all of the warnings and notes on the manual page. Ken Link to comment https://forums.phpfreaks.com/topic/226341-error-message/#findComment-1168309 Share on other sites More sharing options...
Pikachu2000 Posted February 1, 2011 Share Posted February 1, 2011 Even that small piece of code is recognizable as being from phpeasystep.com. Their tutorials are obsolete, and should not be used, unless your goal is to learn how to write for PHP 4. Link to comment https://forums.phpfreaks.com/topic/226341-error-message/#findComment-1168340 Share on other sites More sharing options...
xxreenaxx1 Posted February 2, 2011 Author Share Posted February 2, 2011 Thanks for the help. And Yes I am playing with the codes. Jesus commenting on all my codes and what not. I am just using them to help me learn PHP. Is that a crime now? Link to comment https://forums.phpfreaks.com/topic/226341-error-message/#findComment-1168789 Share on other sites More sharing options...
Pikachu2000 Posted February 2, 2011 Share Posted February 2, 2011 What is the point of learning code that's obsolete and probably won't run at all with the next release of PHP? Planning a trip back in time, are you? Link to comment https://forums.phpfreaks.com/topic/226341-error-message/#findComment-1168965 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.