jeudi 19 mars 2015

Redirecting PHP Login page

I am trying to redirect my php login page so that if user is authorised, it goes to a page (r_index.php) and if the user isn't authorised they go back to the login page (login.html).


This is my code:



<?php
if ("password"=="$password") { // Start the condition ?>
<a href="r_index.php">Manage classes</a>
<?php } // End the condition ?>
<?php if ("password"=="") { ?>
<a href="login.html">Login</a>
<?php }
?>.


What am I doing wrong? How should I resolve it?


Aucun commentaire:

Enregistrer un commentaire