dont us "_" for your own variables .. eg ; $_Email should just be $email ... dont think it actually has any negative effects ... but its a bad habbit.
Apart from that it looks ok... easy enough to follow .... you might be better off usine $_SESSION[''] as opposed to $_POST to track a logged in user however.
Have you tried to use it yet ?
edit:
Instead of this:
- Code: Select all
if($_POST['Uname'] == '')
use :
- Code: Select all
if($_SESSION['Uname'] != "yes")
just remember to set $_SESSION['Uname] == "yes" .. when they first log in