Contact Page

Kasey
Offline
Last seen: 1 year 11 months ago
Thu, 09/03/2015 - 06:47
#1
Contact Page
Kasey
Offline
Last seen: 1 year 11 months ago
Thu, 09/03/2015 - 06:49
Neo
Offline
Last seen: 1 year 4 months ago
Thu, 09/03/2015 - 09:56

Hi Kasey,

All your hosting need is support mail() function. From email was added to the code, you can find it in line 42 processContact.php:

$headers = "From: $email";

the $email variable is email address that user submit to contact form, so you can reply when you get it.

Kasey
Offline
Last seen: 1 year 11 months ago
Sat, 09/05/2015 - 00:56
cindy
cindy's picture
Offline
Last seen: 11 hours 23 min ago
Sat, 09/05/2015 - 12:36

Hi,

Line 42: from email (the email you will reply)

Line 40: receiving email (you need to change to your email)

If you can not send or receive email, it is because of your host

Kasey
Offline
Last seen: 1 year 11 months ago
Sun, 09/06/2015 - 09:15

On the Fitlook page, the contact us information seems to work but the submit message is extremely slow.  The actual contact us page does not work.  It flutters as if the submit message will show but it doesn't. Both use the same php file.

Kasey
Offline
Last seen: 1 year 11 months ago
Tue, 09/08/2015 - 01:54

FITLOOK Page ImageImage title

Neither contact page or the contact info on the fitlook page is working.  On the Contact  us page the text is in white so it doesnt appear. I have attached screenshots of the pages as well as the script.  I my hosting is able to sendmail Mail() script

Contact us Page

Image title

ScriptImage title

cindy
cindy's picture
Offline
Last seen: 11 hours 23 min ago
Tue, 09/08/2015 - 10:08

Hi,

Please open file style.css 

and change:

#contact-content {
    color: #fff;
}

to:

#contact-content {
    color: #333;
    font-size: 18px;
    clear: both;
    padding: 15px;
}

Kasey
Offline
Last seen: 1 year 11 months ago
Wed, 09/09/2015 - 07:57

I am still not able to get responses from either the contact page or the contact us on the fitlook page.  I have checked with my hosting company and they support mail().

Also on the fitlook page the contact us bleeds over in to the page

fitlook contact

This is the code for the contact pages

<?php

// Clean up the input values
foreach($_POST as $key => $value) {
if(ini_get('magic_quotes_gpc'))
$_POST[$key] = stripslashes($_POST[$key]);
$_POST[$key] = htmlspecialchars(strip_tags($_POST[$key]));
}

// Assign the input values to variables for easy reference
$name = $_POST["name"];
$email = $_POST["email"];
$message = $_POST["message"];
// Test input values for errors
$errors = array();

if(!$email) {
$errors[] = "You must enter an email.";
} else if(!validEmail($email)) {
$errors[] = "You must enter a valid email.";
}
if(strlen($message) < 10) {
if(!$message) {
$errors[] = "You must enter a message.";
} else {
$errors[] = "Message must be at least 10 characters.";
}
}

if($errors) {
// Output errors and die with a failure message
$errortext = "";
foreach($errors as $error) {
$errortext .= "<li>".$error."</li>";
}
die("<div class='thanks failure'>The following errors occured:<ul>". $errortext ."</ul></div>");
}
// Send the email
$to = "[email protected]";
$subject = "Contact Form: $name";
$headers = "From: [email protected]";

mail($to, $subject, $name, $email, $message, $headers);

// Die with a success message
die("<div class='thanks'>Thank You For Submitting Your Testimony! </div>");

// A function that checks to see if
// an email is valid
function validEmail($email)
{
   $isValid = true;
   $atIndex = strrpos($email, "@");
   if (is_bool($atIndex) && !$atIndex)
   {
      $isValid = false;
   }
   else
   {
      $domain = substr($email, $atIndex+1);
      $local = substr($email, 0, $atIndex);
      $localLen = strlen($local);
      $domainLen = strlen($domain);
      if ($localLen < 1 || $localLen > 64)
      {
         // local part length exceeded
         $isValid = false;
      }
      else if ($domainLen < 1 || $domainLen > 255)
      {
         // domain part length exceeded
         $isValid = false;
      }
      else if ($local[0] == '.' || $local[$localLen-1] == '.')
      {
         // local part starts or ends with '.'
         $isValid = false;
      }
      else if (preg_match('/\\.\\./', $local))
      {
         // local part has two consecutive dots
         $isValid = false;
      }
      else if (!preg_match('/^[A-Za-z0-9\\-\\.]+$/', $domain))
      {
         // character not valid in domain part
         $isValid = false;
      }
      else if (preg_match('/\\.\\./', $domain))
      {
         // domain part has two consecutive dots
         $isValid = false;
      }
      else if(!preg_match('/^(\\\\.|[A-Za-z0-9!#%&`_=\\/$\'*+?^{}|~.-])+$/',
                 str_replace("\\\\","",$local)))
      {
         // character not valid in local part unless 
         // local part is quoted
         if (!preg_match('/^"(\\\\"|[^"])+"$/',
             str_replace("\\\\","",$local)))
         {
            $isValid = false;
         }
      }
      if ($isValid && !(checkdnsrr($domain,"MX") || checkdnsrr($domain,"A")))
      {
         // domain not found in DNS
         $isValid = false;
      }
   }
   return $isValid;
}

?>

Kasey
Offline
Last seen: 1 year 11 months ago
Thu, 09/10/2015 - 07:14

I have been working with my hosting company and they gave suggestions to modify the code.  They do support FormMail.   

hosting company suggestion

<div class="col-md-8">
                        <div class="form-row">
                            <form action="processContact.php" method="post">
                                <div class="form-item form-textarea">
                                    <textarea placeholder="Your Message" name="message"></textarea>
                                </div>
                                <div class="form-item form-type-name">
                                    <input type="text" placeholder="Your Name" name="name">
                                </div>
                                <div class="form-item form-type-email">
                                    <input type="text" placeholder="Your Email" name="email">
                                </div>
                                <div class="form-actions">
                                    <input type="hidden" name="sendtoemail" value="[email protected]" ><br>
                                    <input type="submit" value="Send Email" class="awe-btn awe-btn-2 awe-btn-default text-uppercase">

       </div>
                                <div>                             </form>


<div class="col-md-8">
                        <div class="form-row">
                            <form action="processContact.php" method="post">
                                <div class="form-item form-textarea">
                                    <textarea placeholder="Your Message" name="message"></textarea>
                                </div>
                                <div class="form-item form-type-name">
                                    <input type="text" placeholder="Your Name" name="name">
                                </div>
                                <div class="form-item form-type-email">
                                    <input type="text" placeholder="Your Email" name="email">
                                </div>
                                <div class="form-actions">
                                    <input type="submit" value="Send message" class="awe-btn awe-btn-2 awe-btn-default text-uppercase">
                                </div>
                                <div>                            </form>

but its still not working.  I am not sure what to do

Neo
Offline
Last seen: 1 year 4 months ago
Thu, 09/10/2015 - 10:13

seem like you use mail() function wrong way. Please check this http://php.net/manual/en/function.mail.php

if it does not work, can you send me FTP infor via private message?

Kasey
Offline
Last seen: 1 year 11 months ago
Fri, 09/18/2015 - 07:09

Thanks for your help.  I have managed to get the pages working.  However in Chrome the contact page on the Fitlook page bleeds over the space. Also the photos a not fitting the space of the sliders.  Is there any adjustment for this browser.

contact on fitlook page

cindy
cindy's picture
Offline
Last seen: 11 hours 23 min ago
Fri, 09/18/2015 - 12:16

1, We found an serious error which makes your site run slower. You need to fix all pages immediately.

Image title

We think it is because of inserted script which you can see from above image.

2, Please open file style.css, find: 

.story-slider > li {
margin: 0;
padding-left: 50px;
}

and delete padding-left: 50px

3, Also in file style.css, find:

.footer {
position: relative;
padding: 35px 0;
}

and replace by:

.footer {
position: relative;
padding: 35px 0;
-webkit-transform: translateZ(0);
-moz-transform: translateZ(0);
transform: translateZ(0);
}
Log in or register to post comments