I'm looking forward to getting the ID of the entity that just registered. Only it will be played to another screen, to be registered other information. I wonder how I can get the entity ID when saving the form.
This is HTML
<form action="set.php" method="post">
<div class="col-md-6">
<div class="form-group">
<label class="control-label">*Nome</label>
<input type="text" id="nome" name="nome" class="form-control" placeholder="">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label">Sobrenome</label>
<input type="text" id="sobrenome" name="sobrenome" class="form-control" placeholder="">
</div>
</div>
And this is PHP
<?php
$nome = $_POST ["nome"];
$sobrenome = $_POST ["sobrenome"];
$sql = mysql_query ("INSERT INTO gr_entidade (nome, sobrenome ) VALUES ('$nome', '$sobrenome')");
header("Location: usuario?id=id");
?>
header("Location: usuario?id=id");
Can you give me a hand?