Notice: Undefined index: register on line 12.
This is some old website code that I'm going through to fix - I'm a noob at this.
Originally I was using isset(), but was forced to use null!==
if (isset($_SESSION['id'])) {
echo "<fieldset><legend><b>Error!</b></legend>";
echo "You are already logged in, therefore you can not register a new account!";
echo "</fieldset>";
} else {
if (null !== (!$_POST['register'])) {
echo "<fieldset><legend><b>Registration</b></legend><br />";
echo "Fill out all of these fields below in order to create a new account. This account will be used to enter, so you are advised not to share the information with anyone at all!<br /><br />";
echo "<form method=\"POST\">";
I expect to get a working registration form, but get this. I get the same undefined index error in other files as well in similar scenarios.