Ver Mensaje Individual
  #3 (permalink)  
Antiguo 04/07/2006, 08:01
despuescambiodenick
 
Fecha de Ingreso: abril-2006
Ubicación: Santa Cruz
Mensajes: 74
Antigüedad: 18 años, 1 mes
Puntos: 0
Los Codigos version minima

Formulario.html
Código PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"
>
<
html>
<
head>
<
title>Formulario</title>
<
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</
head>
<
body>
<
form action="http://www.dominio.com/procesa.php" method=post>
  <
p>Encuesta</p>
  <
p>Nombre :<input type=text name="nom" size=15></p>
  <
p>Email : <input type=text name="ema" size=15></p>
  <
p>Ciudad :<input type=text name="ciu" size=15></p>
  <
input name="submit" type=submit value="Enviar">
</
form>
</
body>
</
html
Procesa.php
Código PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 
<html> 
<head> 
    <title>Procesa</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head> 
<body>
<? 
if (!$HTTP_POST_VARS){ 
?>
<? 
}else{ 
    
$cuerpo "Formulario\n";
    
$cuerpo .= "-------------------------------------" $HTTP_POST_VARS["nul"] . "\n";
    
$cuerpo .= "Nombre: " $HTTP_POST_VARS["nom"] . "\n";
    
$cuerpo .= "Email: " $HTTP_POST_VARS["ema"] . "\n";
    
$cuerpo .= "Ciudad: " $HTTP_POST_VARS["ciu"] . "\n";
    
$headers .= "cc: [email protected]\r\n";

    
mail("[email protected]","Encuesta",$cuerpo,$headers);

    echo 
"¡ Muchas gracias ! ";

?>
</body>
</html> 


<body>
<meta http-equiv=refresh content=0;URL="gracias.html">
</body>
</html>