formulario.php
Código HTML:
Ver original<form name="form1" method="post" action="datosdelformulario.php"> <input type="text" name="nombre" /> <input type="text" name="edad" /> <input type="submit" name="enviar" value="Enviar" />
datosdelformulario.php
Código PHP:
Ver original<?php
if(isset($_POST['enviar'])){ $_nombre=$_POST['nombre'];
$_edad=$_POST['edad'];
echo "tu nombre : ".$_nombre." tu edad: ".$_edad." fecha: ".$fecha." hora: ".$hora;
}
?>
1 .- solo debes hacer uso de $_POST para obtener los datos del formulario.
2.- en el formulario en el action debes colocar la url