-1
I have my index.php and can insert data in the database using html form, but I need several screens for this form or 3 screens, index.php, tela2.php and tela3.php how do I make only 1 insertion using a Ubmit button at the end of everything on the screen3.php but taking all the fields of the 3 screens and only 1 insertion as said? I am using the code below but it only does the insertion in the form fields on the same screen.
if(isset($_POST['acao'])){
$nome = $_POST['nome'];
$sobrenome = $_POST['sobrenome'];
$momento_registro = date('Y-m-d H:i:s');
$sql = $pdo->prepare("INSERT INTO `clientes` VALUES(null,?,?,?)");
$sql->execute(array($nome,$sobrenome,$momento_registro));
//echo 'Cliente inserido com sucesso!';
}