-1
Hello, I’m studying php, and my teacher asked to Create a PHP page containing a form with 3 fields. After clicking on SUBMIT, on the second page assemble a new form with another 3 fields. After clicking on the second SUBMIT, call the third page showing the 6 entered values. I tried to use get and post, however, I could not carry the values of the arrays to the third page. does anyone have any hint of what I can do? below follows the code of the first two pages
<?php
echo "<HTML><HEAD><TITLE>Informações</TITLE></HEAD><BODY>";
?>
<form action="pg2.php">
<br><label for="nome"><b>Nome</b></label>
<input type="text" placeholder="Digite seu nome" name="nome" required method="get"><br>
<br><label for="email"><b>E-mail</b></label>
<input type="text" placeholder="Digite seu E-mail" name="email" required method="get"><br>
<br><label for ="idade"> Idade </label>
<input type ="number" placeholder="Sua idade:" name ="idade" required method="get"><br>
<br>
<br>
<input type="submit" value="Enviar">
</form>
<?php
echo "</body> </html>";
?>
<?php
print_r($_GET);
echo "<HTML><HEAD><TITLE>Informações</TITLE></HEAD><BODY>";
?>
<form action="pg3.php">
<br><label for="nome_pai"><b>Nome do Pai</b></label>
<input type="text" placeholder="Digite o nome de seu pai" name="nome" required method="get"><br>
<br><label for="nome_mae"><b>Nome da Mãe</b></label>
<input type="text" placeholder="Digite o nome de sua mãe" name="nome" required method="get"><br>
<br><label for="cidade"><b>Cidade</b></label>
<input type="text" placeholder="Digite sua Cidade" name="nome" required method="get"><br>
<br>
<br>
<input type="submit" value="Enviar">
</form>
<?php
echo "</body> </html>"
?>