Tema: Email form
Ver Mensaje Individual
  #7 (permalink)  
Antiguo 01/12/2003, 16:48
Avatar de OooH-Boy
OooH-Boy
 
Fecha de Ingreso: marzo-2002
Mensajes: 70
Antigüedad: 22 años, 1 mes
Puntos: 0
Hola, hola, gracias por toda la yuda ya solucione mi problema del hosting hasta el de my personal server funciona ya, estoy utilizando un form en swishmax y el PHP, me funciona muy bien pero ahora me gustaria utilizar solo html y PHP, me podrian decir como utilizar este codigo y si me pueden dar unamanito para dar un mensage de que el mail fue enviado o si no lo envio, aqui esta el codigo PHP a ver si me dicen como cambiarlo ok gracias..


<?php

$name = $HTTP_POST_VARS['Name'];
$Dept = $HTTP_POST_VARS['Dept'];
$City = $HTTP_POST_VARS['City'];
$Phone = $HTTP_POST_VARS['Phone'];
$email = $HTTP_POST_VARS['Email'];
$message = $HTTP_POST_VARS['Message'];
// Cursing Reamoval Tool
$message = eregi_replace('fuck', "flip", $message);
$message = eregi_replace('hell', "bad place", $message);
$message = eregi_replace('shit', "crap", $message);
$message = eregi_replace('bitch', "nice lady", $message);
$message = eregi_replace('ass', "butt", $message);
$message = eregi_replace('piss', "pee", $message);
// Cursing Remove
$name = stripslashes($name);
$Dept = stripslashes ($Dept);
$City = stripslashes ($city);
$Phone = stripslashes ($Phone);
$email = stripslashes($email);
$message = stripslashes($message);

//Here is where you put your info so it will be sent to you.
$rec_email = "[email protected]"; // How gets this email
$subject = "Hello From The Web"; // Here is what goes in the Subject line



// This will display the info on who sent it
$msg_body = "<html><head></head><body>";
$msg_body = "<font face=\"Verdana\" size=\"2\">";
$msg_body .= "<i>Message from <a href=\"$SERVER_NAME\">$SERVER_NAME</a></i><br>";
$msg_body .= "<hr width=\"100%\" size=\"1\" color=\"#333333\"><br>";


$msg_body .= "<b>Dept:</b> $Dept<br>";
$msg_body .= "<b>Name:</b> $name<br>";
$msg_body .= "<b>City:</b> $City<br>";
$msg_body .= "<b>Phone:</b> $Phone<br>";
$msg_body .= "<b>E-Mail:</b> <a href=\"mailto:$email\">$email</a><br><br>";
$msg_body .= "<b>Comments:</b> $message<br>";


// Info on the one that sent the mail
$msg_body .= "<hr width=\"100%\" size=\"1\" color=\"#333333\"><br>";
$msg_body .= "<br><br>";
$msg_body .= "<i>Additional Sender Information</i><br>";
$msg_body .= "<hr width=\"100%\" size=\"1\" color=\"#000000\"><br>";
$msg_body .= "<b>IP Address:</b> $REMOTE_ADDR<br>";
$HostName = gethostbyaddr($_SERVER['REMOTE_ADDR']);
$msg_body .= "<b>Host:</b> $HostName<br>";
$msg_body .= "<hr width=\"100%\" size=\"1\" color=\"#333333\"><br>";
$msg_body .= "</font></body></html>";

// This is the Header Information
$header_info = "MIME-Version: 1.0\r\n";
$header_info .= "Content-type: text/html; charset=iso-8859-1\r\n";
$header_info .= "From: ".$name." <".$email.">";

mail($rec_email, $subject, $msg_body, $header_info);

?>