Ver Mensaje Individual
  #9 (permalink)  
Antiguo 05/10/2008, 12:57
Avatar de jaronu
jaronu
 
Fecha de Ingreso: febrero-2008
Mensajes: 2.183
Antigüedad: 16 años, 2 meses
Puntos: 52
Respuesta: Crear send.php a partir de un formulario ya echo en html

Código PHP:

    $nom 
seguridad ($_POST['nom']);
            
$cognom seguridad ($_POST['cognom']);
            
$empresa seguridad ($_POST['empresa']);
            
$direccio seguridad ($_POST['direccio']);
            
$poblacio seguridad ($_POST['poblacio']);
            
$provincia seguridad ($_POST['provincia']);
            
$comentari seguridad ($_POST['comentari']);
            
$telefon seguridad ($_POST['telefon']);
            
$email seguridad ($_POST['email']);
    
    
    
        if (
$nom ==NULL || $cognom ==NULL || $empresa == NULL || $direccio == NULL || $poblacio ==NULL || $provincia == NULL || $email == NULL){
            
        
                echo 
'<div align=center><table width="600"   border="0" cellspacing="0" cellpadding="0">';
                echo 
'<tr aling= "center" class="Estilo1">';
                echo 
"<div align=center>";
                echo 
"Sius plau rellene tot el formulari de contecte, graçies";
                echo 
"</div>";
                echo 
"<br>";
                echo 
"<br>";
                echo 
"<div align=center>";
                echo 
"<a href= \"javascript:history.go(-1)\" class=\"Estilo1\">Torna</a>";
                echo 
"</div>";
                echo 
"</tr>";
    
                echo 
"</table>";
                echo 
"</div>";
    
                                
        }else {
        
    if (isset (
$_POST['nom']) ){
    
            
    
    
$nombre_origen    "xxxxxxxxxx";
$email_origen     "[email protected]";
$email_copia      "[email protected]";
$email_ocultos    "[email protected]";
$email_destino    "[email protected]";  //cambiar esta linea por la de encima cuando termine la aplicacion


$asunto           " Rebut email de contacte de ".$empresa."";

$mensaje          '<table width="629" border="0" cellspacing="1" cellpadding="2">
  <tr>
    <td width="623" align="left"></td>
  </tr>
  <tr>
    <td bgcolor="#E0911B"><div style="color:#FFFFFF; font-size:14; font-family: Arial, Helvetica, sans-serif; text-transform: capitalize; font-weight: bold;"><strong>     Email de contacte de '
.$empresa.'</strong></div></td>
  </tr>
  <tr>
    <td height="95" align="left" valign="top"><div style=" color:#000000; font-family:Arial, Helvetica, sans-serif; font-size:12px; margin-bottom:3px;"> </strong><br><br>
         
          <strong>NOM : </strong>'
.$nom.'</strong><br><br>
          <strong>COGNOM : </strong>'
.$cognom.'</strong><br><br>
          <strong>DIRECCIO : </strong>'
.$direccio.'</strong><br><br>
          <strong>POBLACIO : </strong>'
.$poblacio.'</strong><br><br>
          <strong>PROVINCIA : </strong>'
.$provincia.'</strong><br><br>
          <strong>TELEFON : </strong>'
.$telefon.'</strong><br><br>
          <strong>E-MAIL : </strong>'
.$email.'</strong><br><br>
          <strong>COMENTARI : </strong>'
.$comentari.'</strong><br><br><br>
          
         
    </div>
    </td>
  </tr>
</table>'
;

                


$formato          "html";

//*****************************************************************//
$headers  "From: $nombre_origen <$email_origen> \r\n";
$headers .= "Return-Path: <$email_origen> \r\n";
$headers .= "Reply-To: $email_origen \r\n";


$headers .= "X-Sender: $email_origen \r\n";

$headers .= "X-Priority: 3 \r\n";
$headers .= "MIME-Version: 1.0 \r\n";
$headers .= "Content-Transfer-Encoding: 7bit \r\n";

//*****************************************************************//
 
if($formato == "html")
 { 
$headers .= "Content-Type: text/html; charset=iso-8859-1 \r\n";  }
   else
    { 
$headers .= "Content-Type: text/plain; charset=iso-8859-1 \r\n";  }

if (@
mail($email_destino$asunto$mensaje$headers)) 
    { 
    
    
    
    
    
    
    
?> 
ahi va pero NO HAS BUSCADO NADA EN LA RED NI EN EL FORO, creo que no te has molestado ni siquiera en mirar los ejemplos que te hemos puesto, pero bueno, a mi no me importa compartir codigos, pero no esperes que te lo explique eso ya es cosa tuya

suerte