I'm pretty far in to development right now so this code is not considered final.
Code: Select all
if ($_POST['formis'] == 'signin')
{
$user = $_POST['username'].'@jabcreations.com';
$pass = $_POST['password'];
$mbox = imap_open("{localhost:143/notls}", $user, $pass);
if (!$mbox) {$_SESSION['error'] = "Unable to connect authenticate?"; header("location:mail.php?error1");}
else
{
$_SESSION['member'] = $_POST['username'];
$_SESSION['mail'] = $_POST['username'].'@jabcreations.com';
$_SESSION['pass'] = $_POST['pass'];
header("location:mail.php");
}
}
else if (isset($_SESSION['member']))
{
$mail = $_SESSION['mail'];
$pass = $_SESSION['pass'];
$mbox = imap_open("{localhost:143/notls}", $_SESSION['mail'], $_SESSION['pass']);
if (!$mbox) {$_SESSION['error'] = "Unable to connect authenticate?"; header("location:mail.php?error2");}
}