Ver Mensaje Individual
  #14 (permalink)  
Antiguo 03/11/2011, 09:26
Jor1980
 
Fecha de Ingreso: mayo-2011
Mensajes: 72
Antigüedad: 12 años, 11 meses
Puntos: 1
Respuesta: acceder al atributo name y al valor de los elementos &_GET[]

Al final el código me quedó así:

Código PHP:
<?
$email
=$_GET['email'];
$teléfono=$_GET['teléfono'];



if(
$email $teléfono !="")
{
    
$message="";
    foreach(
$_GET as $nombre_html=> $valor_html)
    {
    echo 
$nombre_html."--".$valor_html."<br>";
    
$message+= $nombre_html.": ".$valor_html."<br>";    
    }
    
    
mail("[email protected]","prueba",$message);
}

?>
EL problema ahora es que al pulsar el botón enviar de mi formulario no recibo ningún email con el contenido.

El formulario lo inicié así:
<form action="email.php" method="post">

y el botón enviar tiene este código:

<input type="submit" name="enviar" onclick="" style="height:30px; width:150px; margin-top:15px; margin-left:15px;" value="Enviar datos"/>