Hi all new to php and experimenting alot. Trying to do a simple password protected html-page and is stock.
Got a textfield on the first html page with this code in the bodytags
<form action="index2.php" method="post"> <div align="center">Login: <input type="text" name="pass"> <input type="submit" value="Logga in"> </div> </form>
and on the index2.php page I got this code
<? $pass = $_POST['pass'] if ($pass == !"password"){ break; } ?>
under this code the html page follows. The idea is if you don´t type "password" in the textfield the php script in page index2.php will stop after the break command and the html that follows won´t show, and if you do type "password" there won´t be a break and the html code will show.
I´m obviosly missing something so please be kind...I am new ;-)