I keep getting an undefined index to this..When I take error reporting off, all is good, but I am looking for a way to fix this the "RIGHT WAY"
On my form on register.php, the button looks like this
<input type="submit" name="submit" class="btn btn-kani btn-lg" value="Sign Up"/>
This is then linked to another page called login.php
Login.php code
I have tried
if (isset($_POST['submit']=="Sign Up")) {
// etc.
I have tried
if ($_POST['submit']=="Sign Up") {
// etc.
Same with the logout because of the session, not sure how it should be coded....The button reads
<li class="inactive"><a href="logout.php?logout=1">Log Out</a></li>
and the code on login.php
if($_GET["logout"]==1 AND $_SESSION['id']) {
session_destroy();
header("Location:../logout.php");
}