VISUAL NOISE Posted October 31, 2006 Share Posted October 31, 2006 hi, i dont know what i did wrong in this php script and its messing up my contact form. What happens is that when you enter information on the contact form and click send, the email is sent but all the info on the contact form does not appear. it worked fine until i changed hosting providers to mediatemple. please help!!this is the php script:<html><base target="_self"><META HTTP-EQUIV="REFRESH" CONTENT="3;URL=http://www.inds.com.mx/thankyou.html"></head><body bgcolor="151515" text="#ffffff">[code=php:0]<?$MailTo = "[email protected]"; //email to send the results to$MailSubject = "Contact Form"; //text in the Subject field of the mail$MailHeader = "From: Contact Form"; //text in the From field of the mail$MailSent = "<center><img border=0 src=thanks.jpg width=438 height=161></center>"; //confirm image/* You can edit the for fields below */if ($nombre == ""){ //name of field 1}else { $MailBody = "Name | Nombre: $nombre\n"; //This value is inserted inthe mailbody}if ($calle == ""){}else { $MailBody .= "Calle | Street: $calle\n";}if ($number == ""){}else { $MailBody .= "Numero | Number: $number\n";}if ($interior == ""){}else { $MailBody .= "Dept. | Apt.: $interior\n";}if ($colonia == ""){}else { $MailBody .= "Colonia | Colony: $colonia\n";}if ($ciudad == ""){}else { $MailBody .= "Ciudad | City: $ciudad\n";}if ($codigo == ""){}else { $MailBody .= "Codigo Postal | Postal Code: $codigo\n";}if ($estado == ""){}else { $MailBody .= "Estado | State: $estado\n";}if ($pais == ""){}else { $MailBody .= "Pais | Country: $pais\n";}if ($correo == ""){}else { $MailBody .= "E-mail | Correo-E: $correo\n";}if ($telefono == ""){}else { $MailBody .= "Telefono | Telephone: $telefono\n";}if ($rfc == ""){}else { $MailBody .= "RFC | RFC: $rfc\n";}if ($area == ""){}else { $MailBody .= "Area | Department: $area\n";}if ($comments == ""){}else { $MailBody .= "Comentarios | Comments: $comments\n";}//Routine to send message{mail($MailTo, $MailSubject, $MailBody, $MailHeader); //message sendecho("$MailSent"); //Confirmation message.}?>[/code]<p><p><p> <br><p></body></html>and my website is www.inds.com.mxi already re-did the contact form and php script and im still getting the same problemcould the hosting provider be the problem?thanks for your time Link to comment https://forums.phpfreaks.com/topic/25730-please-help-contact-form-not-working/ Share on other sites More sharing options...
scliburn Posted October 31, 2006 Share Posted October 31, 2006 it could be that the global variables ini setting is off. You would need to call to the [code]$_POST['variables'][/code] variables instead. Link to comment https://forums.phpfreaks.com/topic/25730-please-help-contact-form-not-working/#findComment-117439 Share on other sites More sharing options...
sinisake Posted October 31, 2006 Share Posted October 31, 2006 Put extract($_POST);before:if($nombre.... Link to comment https://forums.phpfreaks.com/topic/25730-please-help-contact-form-not-working/#findComment-117441 Share on other sites More sharing options...
VISUAL NOISE Posted October 31, 2006 Author Share Posted October 31, 2006 thanks for the help, problem solved. thanks for your time. Link to comment https://forums.phpfreaks.com/topic/25730-please-help-contact-form-not-working/#findComment-117449 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.