This is a slightly strange question so bare with me. I've been dabbling in PHP for a while and to help further my PHP skills I created a basic URL shortening service with a login and registration system, this works fine however I'm not sure I organised it in the best manner.
What I basically did was have an if statement at the top of the page which would check for example if the username field has been posted if not it would run:
Code: Select all
include_once("interface/login.php");
die();Code: Select all
<body><?php if(isset($pass_error)) { echo $pass_error; }?>Code: Select all
$pass_error = "<div class='error'>You have entered an incorrect username/password</div>";
include_once("interface/login.php");
die();Thank you,