I have these two pages each with a form, I would like to be able to send the information of the two forms in an email. How do I save the values of the fields nome
and numero
and send only on page2 along with the other two fields of the form? I want to avoid sending an email first with the information on page1 and then sending another email with the information on page2.
Page1.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Titulo</title>
</head>
<script type="text/javascript">
</script>
<body>
<form name="form" method="post" action="">
Nome:
<input type="text" name="nome">
Numero:
<input type="text" name="numero">
<input type="submit" onclick="window.location.href='pagina2.html';">
</form>
</body>
</html>
Page2.html:
<head>
<meta charset="UTF-8">
<title>Titulo</title>
</head>
<?php
$nome = $_POST['nome'];
...
?>
<body>
<form name="form" method="post" action="">
Endereço:
<input type="text" name="end">
Bairro:
<input type="text" name="bairro">
<input type="submit">
</form>
</body>
</html>