Hi, I'm new to php. I have a question with the button on my page. At the moment of clicking the button, it does not show me anything, but in my code, if it is configured to see if it is pressed or not. When I use the question mark in front of the isset, if I get the click, but I do not understand prq. From what I was seeing, when it's isset .. it tells me that the button was pressed, but when it is! Isset tells me that the button was not pressed.
.boxlogin{
border-radius:4px;
box-shadow: 2px 2px #d6d6d6;
margin: 75px auto;
width: 320px;
-webki-border-radius:4px;
-moz-border-radius:4px;
}
.btn{
margin-top: 14px;
}
<html lang="en">
<head>
<meta charser="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/estilos.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="js/jquery.js"></script>
<script src="~/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<header>
</header>
<div class="jumbotron boxlogin">
<form method="POST" name="flogin" id="flogin" action="">
<label>Usuario:</label>
<input type="text" name="username" class="form-control">
<label>Contraseña:</label>
<input type="password" name="password" class="form-control">
<button name="btnClickI" type="button" class="btn btn-success" data-toggle="modal" data-target="#ingreso">Ingresar</button>
<a href="registro.php"><button value="btnClickR" type="button" class="btn btn-info">Registrar</button></a>
<?php
if(isset($_GET['btnClickI'])){
if( !isset($_POST['username']) or !isset($_POST['password']) ) {
echo '<div id="ingreso" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-diolag">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
<div class="modal-body">
<h3>Por favor llene todo los campos!</h3>
</div>
</div>
</div>
</div>';
}else{
}
}
?>
</form>
</div>
<script type="http://code.jquery.com/jquery-latest.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>