El codigo del formulario es el siguiente:
Código PHP:
<form action="index.php" method="post">
Nombres: <input type='text' name="nombres">
<br>
Apellidos: <input type='text' name='apellidos'>
Edad: <input type='text' name='edad'>
Correo a:
<select name=correo>
<option>[email protected]
<option>[email protected]
<option selected>[email protected]
</select>
<br>
Titulo: <input type='text' name='titulo'>
<br>
Mensaje:
<br>
<input type='text' name='mensaje' >
<br>
<input type='submit' value='enviar'>
<input type='reset' value='borrar'>
<?php
if($nombre!='')
{
echo "<br>";
echo "Nombre:".$nombre;
}
if($correo!='')
{
echo "<br>";
echo "Correo a: ".$correo;
}
if($titulo!='')
{
echo "<br>";
echo "Titulo: ".$titulo;
}
if($mensaje!='')
{
echo "<br>";
echo "Mensaje: ".$mensaje;
}
?>
</form>