So I make a Coding Tutorial at my server, but not anyone can access it, because it's protected by some password. They will be redirected in some page named passwordinput.php instead of codingtutorial.php. Then if the password is the correct one, they will be redirected into the codingtutorial.php page, but if the password is the incorrect one, some alert shows 'Incorrect password. Remember that password is case-sensitive'.
And I've tried to work with $_get now, but still, no work.
The code looks like this :
And I've tried to work with $_get now, but still, no work.
The code looks like this :
- Code:
<?php
$password = $_GET['password'];
if ($password != 'pass' {
header ('Location : /codingtutorial.php');
}
else {
$popup = "Incorrect password. Remember that password is case-sensitive."
echo '<script type=text/javascript>alert('$popup');</script>'
}