Ver Mensaje Individual
  #3 (permalink)  
Antiguo 12/12/2012, 18:19
Avatar de lair
lair
 
Fecha de Ingreso: enero-2009
Ubicación: header('Location: Morelia");
Mensajes: 1.052
Antigüedad: 15 años, 3 meses
Puntos: 46
Respuesta: Botón que ejecute código php

Como dijo Pleyano

Prueba modificando tu codigo asi:

Código PHP:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3.  
  4. <head>
  5. <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
  6. <title>Correo</title>
  7. </head>
  8.  
  9. <body>
  10.     <?php
  11.            if(isset($_POST){
  12.             mail("[email protected]","asunto",$_POST['Text1']) ;
  13.                }
  14.     ?>
  15.  
  16.  
  17.  
  18. <form method="post">
  19.  
  20.   <input type="text" name="Text1"/>
  21.   <input type="submit" value="Enviar" onclick="correo()" name="miBoton"/>
  22.  
  23. </body>
  24.  
  25. </html>


Saludos