I have this HTML code
<!DOCTYPE html>
<HTML>
<HEAD>
<TITLE>Cadastro</TITLE>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
</HEAD>
<BODY>
<div class="container">
<form method="POST" class="form-horizontal" action="teste.php">
<div class="form-group">
<label for="pesNome" class="col-sm-2 control-label">Nome</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="pesNome" placeholder="Nome">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-default">Gravar</button>
</div>
</div>
</form>
</div>
</BODY>
</HTML>
And this PHP code
<!DOCTYPE HTML>
<html>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<?php
$nome=isset($_POST['pesNome']);
var_dump($nome);
?>
<a href="index.php">voltar</a>
</html>
My intention is for var_dump
to return what was typed in the input keyword , but instead returns me the message bool(false)
.
Can anyone explain me the reason?