Hi,
I am trying to show the registration form, only when the user is not logged in, or has not just recently registered.
Unfortunately, if the user is logged in, the echo message is displayed correctly, but the form still comes up.
I'm sure it's to do with the way I have the if and else statements set out.
<?php
if (isset($_POST['submit']) && $_POST['submit'] == 'Register')
{
reg_results();
}
if ($_SESSION['LoggedIn'] == 1)
{
echo '
Welcome <font color="#003366">' . $_SESSION['username'] . '</font> , you are already a registered member.<br><br>
';
}
if ($_SESSION['Registered'] == 1)
{
echo '
You have already signed up! You may login with your details.
';
}
else
{
register_form();
}
?>