Jump to content
Killersites Forums

Trouble With Form Script


daddyalfie
 Share

Recommended Posts

Hi y'all!

 

My customer has recently experienced trouble with his response form (As discussed earlier under

Business..) He had similar troubles a while back which was eventually resolved, but now it is back! The form itself and the php script were NOT generated by me, and I am not smart enough to analyze them by myself!

 

The form is HERE and the current script is shown below.

 

Any new insights?

 

Thanks! Alfie

 

<?php

$to = "chmyrockin@blueridge.net" ;

$from = $_REQUEST['email'] ;

$name = $_REQUEST['name'] ;

$headers = "From: $from";

$subject = "Information About Chimney Rock Inn";

 

$fields = array();

$fields{"name"} = "name";

$fields{"phone"} = "phone";

$fields{"email"} = "email";

$fields{"arrival"} = "arrival";

$fields{"DateLeaving"} = "DateLeaving";

$fields{"roomtype"} = "roomtype";

$fields{"adults"} = "adults";

$fields{"children"} = "children";

$fields{"homenumber"} = "homenumber";

$fields{"cottagetype"} = "cottagetype";

$fields{"comments"} = "comments";

 

 

$body = "We have received the following information:\n\n"; foreach($fields as $a => $B){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); }

 

$headers2 = "From: chmyrockin@blueridge.net";

$subject2 = "Thank you for contacting us";

$autoreply = "Thank you for contacting us.

You will be receiving more information shortly from us.";

 

if($from == '') {print "You have not entered an email, please go back and try again";}

else {

if($name == '') {print "You have not entered a name, please go back and try again";}

else {

$send = mail($to, $subject, $body, $headers);

$send2 = mail($from, $subject2, $autoreply, $headers2);

if($send)

{print "Thank You for contacting Us! You will be contacted soon about your request" ;}

else

{print "We encountered an error sending your mail, please notify chmyrockin@blueridge.net"; }

}

}

?>

Link to comment
Share on other sites

Never mind folks! Turns out to be his server blocking his e-mails!!! I have never experienced such a screw-up in my life.

 

We still do not know who is actually hosting his site. I guess we will have to wait to see who bills him!

 

Happy holidays to all!

 

Alfie

 

In the mean time you can install a 3rd party SMTP mailer such as PHPmailer or Swiftmailer. They're not the easiest programs to use and incorporate. However, once installed and configured correctly you never have to worry about googles smtp servers going offline.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...