I have a login form that requests user and password. If successful it is to bring me into a page called login2.php (as an example, not the real name) In the login2 page if the individual choses the wrong user then they are supposed to be diverted back to the login.php (see the code here)
<?php //check for required fields from the form if ((!$_POST['user']) || (!$_POST['password'])) { header("Location: login.php"); exit; } $link = mysqli_connect("host", "myuser", "mypassword", "mydatabase"); if (!$link) { echo "Error: No connection. User and Password needed" . PHP_EOL; exit; } echo "Welcome to the Page. " . PHP_EOL; //echo "Host information: " . mysqli_get_host_info($link) . PHP_EOL; mysqli_close($link); $display_block = "My Mailing List