I am using a new to me button click, and the selections fall through to the next selection. I can’t find the problem. Someone PLEASE help!
<?php
// Initialize the session
session_start();
// Check if the user is logged in, if not then redirect him to login page
if(!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true){
header("location: login.php");
exit;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Welcome</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<style type="text/css">
#bg {
position: fixed;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
}
#bg img {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
min-width: 50%;
min-height: 50%;
}
</style> <style>
body{ font: 9px sans-serif; text-align: center; }
</style>
</head>
<body>
<p style="font-size:20px">
Hi, <b><?php echo htmlspecialchars($_SESSION["username"]); ?></b>. Welcome to our site.
<p></p>
<table>
<td width=40%>
<div align="center"><button name="foo" type="button" value="bar" <button onClick="Open()"><img src="reset.jpg" width="150" height="51" /></button>
<script>
function Open() {
window.open("http://www.ka3pmw.com/temp/register/register.php", "_blank");
}
</script>
</div></td>
<td width=40%>
<div>
<script>
function Open() {
window.open("http://www.ka3pmw.com/temp/login/reset-password.php", "_blank");
}
</script>
<div align="center"><button name="foo" type="button" value="bar" <button onClick="Open()"><img src="./logout.jpg" width="93" height="51" /></button>
<script>
function Open() {
window.open("http://www.ka3pmw.com/temp/login/logout.php", "_blank");
}
</script>
</div></td> </table>
</p>
</body>
</html>