A Secret for you....
'; } else { ?>
mysql -u root -p
This will take you to the **mysql>** prompt
create database sample;
connect sample;
create table users(username VARCHAR(100),password VARCHAR(100));
insert into users values('john','pwd');
insert into users values('alice','secret');
quit;
Open your browser, navigate to http://yourwebsite.com/login.php and enter the right pair of credentials.
Username: john
Password: pwd
You'll see a message that indicates successful login. Now come back and enter a wrong pair of credentials-- you'll see the message **Invalid username or password**.
We can confirm that the script works right. The next job is to try our hand with SQL injection to bypass the login page. Enter the following for the **username** field:
' or true --
**NOTE**: There should be a space after **--** this injection won't work without that space. Leave the password field empty and hit the login button.
Voila! The script shows the message meant for authenticated users.