Hello, there. I've been messing around with this stuff recently and ran across this error when trying to output a message when not all login fields are filled in, as well as an error when trying to output a successful login message..
These parts of the code are:
Check all fields filled:
//get the form data
$myusername = ($_POST['username']);
$mypassword = ($_POST['password']);
//check if all fields are filled in
if ( (!$myusername) || (!mypassword) ) ) {
echo "Please fill in all fields";
exit;
}
Check if user exists & log in:
//check if user exists
if ($account ==1) {
$_SESSION["username"] = $myusername;
$_SESSION["password"] = $mypassword;
$_SESSION["userrecord"] = mysql_fetch_assoc($result);
echo "You have been logged in successfully. Please click <a href=account.php>here</a> to continue.";
}
As you can probably tell from the title, the echo does not output onto the webpage.
Any help is very much appreciated. Thanks.