treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Submission Form_ NEED ASSISTANCE! ASAP

  • Hello

    I created this site http://www.leadertours.ca and the client wanted me to create a submission form and paste into the existing contact form. I used the tutorial from css-tricks # 62, and changed and removed a fews things.

    1. I had the existing contact.html which I re-saved as a php and added a code <?php include('contactform.php'); ?>
    to included the php form that i changed from the downloaded files from css-tricks # 62.

    2. I posted to see if it works it doesn't so i placed it online http://www.leadertours.ca/contact.php.

    3rd Problem is that I have i dont know where to put the js stuff into re-saved contact.html to php. What do I do with that.
    So the stylized, and the validation is included. I have no clue how to go about it.

    Please help, this client needs by this weekend I already emailed Chris but I though to take two measures to fix this issue.
    And I tried to figure it out on my own.

    Please find the

    Code: contactform.php attached which is the one i re-named (from the downloaded files from css tricks)

    <?php

    session_start();

    function getRealIp() {
    if (!empty($_SERVER['HTTP_CLIENT_IP'])) { //check ip from share internet
    $ip=$_SERVER['HTTP_CLIENT_IP'];
    } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { //to check ip is pass from proxy
    $ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
    } else {
    $ip=$_SERVER['REMOTE_ADDR'];
    }
    return $ip;
    }

    function writeLog($where) {

    $ip = getRealIp(); // Get the IP from superglobal
    $host = gethostbyaddr($ip); // Try to locate the host of the attack
    $date = date(\"d M Y\");

    // create a logging message with php heredoc syntax
    $logging = <<<LOG
    \n
    << Start of Message >>
    There was a hacking attempt on your form. \n
    Date of Attack: {$date}
    IP-Adress: {$ip} \n
    Host of Attacker: {$host}
    Point of Attack: {$where}
    << End of Message >>
    LOG;
    // Awkward but LOG must be flush left

    // open log file
    if($handle = fopen('hacklog.log', 'a')) {

    fputs($handle, $logging); // write the Data to file
    fclose($handle); // close the file

    } else { // if first method is not working, for example because of wrong file permissions, email the data

    $to = 'ADMIN@gmail.com';
    $subject = 'HACK ATTEMPT';
    $header = 'From: ADMIN@gmail.com';
    if (mail($to, $subject, $logging, $header)) {
    echo \"Sent notice to admin.\";
    }

    }
    }

    function verifyFormToken($form) {

    // check if a session is started and a token is transmitted, if not return an error
    if(!isset($_SESSION[$form.'_token'])) {
    return false;
    }

    // check if the form is sent with token in it
    if(!isset($_POST['token'])) {
    return false;
    }

    // compare the tokens against each other if they are still the same
    if ($_SESSION[$form.'_token'] !== $_POST['token']) {
    return false;
    }

    return true;
    }

    function generateFormToken($form) {

    // generate a token from an unique value, took from microtime, you can also use salt-values, other crypting methods...
    $token = md5(uniqid(microtime(), true));

    // Write the generated token to the session variable to check it against the hidden field when the form is sent
    $_SESSION[$form.'_token'] = $token;

    return $token;
    }

    // VERIFY LEGITIMACY OF TOKEN
    if (verifyFormToken('form1')) {

    // CHECK TO SEE IF THIS IS A MAIL POST
    if (isset($_POST['URL-main'])) {

    // Building a whitelist array with keys which will send through the form, no others would be accepted later on
    $whitelist = array('token','req-name','req-email','typeOfChange','urgency','URL-main','addURLS', 'curText', 'newText', 'save-stuff', 'mult');

    // Building an array with the $_POST-superglobal
    foreach ($_POST as $key=>$item) {

    // Check if the value $key (fieldname from $_POST) can be found in the whitelisting array, if not, die with a short message to the hacker
    if (!in_array($key, $whitelist)) {

    writeLog('Unknown form fields');
    die(\"Hack-Attempt detected. Please use only the fields in the form\");

    }
    }



    // Lets check the URL whether it's a real URL or not. if not, stop the script

    if(!filter_var($_POST['URL-main'],FILTER_VALIDATE_URL)) {
    writeLog('URL Validation');
    die('Hack-Attempt detected. Please insert a valid URL');
    }





    // SAVE INFO AS COOKIE, if user wants name and email saved

    $saveCheck = $_POST['save-stuff'];
    if ($saveCheck == 'on') {
    setcookie(\"WRCF-Name\", $_POST['req-name'], time()+60*60*24*365);
    setcookie(\"WRCF-Email\", $_POST['req-email'], time()+60*60*24*365);
    }




    // PREPARE THE BODY OF THE MESSAGE

    $message = '<html><body>';

    $message .= '<table rules=\"all\" style=\"border-color: #666;\" cellpadding=\"10\">';

    $message .= \"<tr style='background: #eee;'><td><strong>Your Full Name:</strong> </td><td>\" . strip_tags($_POST['req-name']) . \"</td></tr>\";

    $message .= \"<tr style='background: #eee;'><td><strong>Group Name:</strong> </td><td>\" . strip_tags($_POST['req-groupname']) . \"</td></tr>\";

    $message .= \"<tr><td><strong>Adress:</strong> </td><td>\" . strip_tags($_POST['req-adress']) . \"</td></tr>\";

    $message .= \"<tr><td><strong>Adress:</strong> </td><td>\" . strip_tags($_POST['req-adress']) . \"</td></tr>\";

    $message .= \"<tr><td><strong>City:</strong> </td><td>\" . strip_tags($_POST['req-city']) . \"</td></tr>\";

    $message .= \"<tr><td><strong>Country:</strong> </td><td>\" . strip_tags($_POST['req-country']) . \"</td></tr>\";

    $message .= \"<tr><td><strong>Home Phone:</strong> </td><td>\" . strip_tags($_POST['req-homephone']) . \"</td></tr>\";

    $message .= \"<tr><td><strong>Business Phone:</strong> </td><td>\" . strip_tags($_POST['req-businessphone']) . \"</td></tr>\";

    $message .= \"<tr><td><strong>Your email:</strong> </td><td>\" . strip_tags($_POST['req-email']) . \"</td></tr>\";

    $message .= \"<tr><td><strong>Trip Information:</strong> </td><td>\" . strip_tags($_POST['req-trip']) . \"</td></tr>\";

    $message .= \"<tr><td><strong>Proposed Group Size:</strong> </td><td>\" . strip_tags($_POST['req-size']) . \"</td></tr>\";

    $message .= \"<tr><td><strong>Type of Change:</strong> </td><td>\" . strip_tags($_POST['typeOfChange']) . \"</td></tr>\";



    $message .= \"<tr><td><strong>Preferred Departure City:</strong> </td><td>\" . strip_tags($_POST['req-pref']) . \"</td></tr>\";

    $message .= \"<tr><td><strong>Proposed Travel Dates:</strong> </td><td>\" . strip_tags($_POST['req-date']) . \"</td></tr>\";

    $message .= \"<tr><td><strong>Destination:</strong> </td><td>\" . strip_tags($_POST['req-dest']) . \"</td></tr>\";

    $message .= \"<tr><td><strong>Departure Date:</strong> </td><td>\" . strip_tags($_POST['req-dep']) . \"</td></tr>\";

    $message .= \"<tr><td><strong>Are you attending?:</strong> </td><td>\" . strip_tags($_POST['attending']) . \"</td></tr>\";

    $message .= \"<tr><td><strong>Do you need?:</strong> </td><td>\" . strip_tags($_POST['need']) . \"</td></tr>\";

    $message .= \"<tr><td><strong>URL To Change (main):</strong> </td><td>\" . $_POST['URL-main'] . \"</td></tr>\";

    $addURLS = $_POST['addURLS'];
    if (($addURLS) != '') {
    $message .= \"<tr><td><strong>URL To Change (additional):</strong> </td><td>\" . strip_tags($addURLS) . \"</td></tr>\";
    }
    $curText = htmlentities($_POST['curText']);
    if (($curText) != '') {
    $message .= \"<tr><td><strong>CURRENT Content:</strong> </td><td>\" . $curText . \"</td></tr>\";
    }
    $message .= \"<tr><td><strong>NEW Content:</strong> </td><td>\" . htmlentities($_POST['newText']) . \"</td></tr>\";
    $message .= \"</table>\";
    $message .= \"</body></html>\";




    // MAKE SURE THE \"FROM\" EMAIL ADDRESS DOESN'T HAVE ANY NASTY STUFF IN IT

    $pattern = \"/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/i\";
    if (preg_match($pattern, trim(strip_tags($_POST['req-email'])))) {
    $cleanedFrom = trim(strip_tags($_POST['req-email']));
    } else {
    return \"The email address you entered was invalid. Please try again!\";
    }




    // CHANGE THE BELOW VARIABLES TO YOUR NEEDS

    $to = 'rachellambo@gmail.com';

    $subject = 'Group Travel Quote Form';

    $headers = \"From: 'rachellambo@gmail.com' ;
    $headers .= \"Reply-To: \". strip_tags($_POST['req-email']) . \"\r\n\";
    $headers .= \"MIME-Version: 1.0\r\n\";
    $headers .= \"Content-Type: text/html; charset=ISO-8859-1\r\n\";

    if (mail($to, $subject, $message, $headers)) {
    echo 'Your message has been sent.';
    } else {
    echo 'There was a problem sending the email.';
    }

    // DON'T BOTHER CONTINUING TO THE HTML...
    die();

    }
    } else {

    if (!isset($_SESSION[$form.'_token'])) {

    } else {
    echo \"Hack-Attempt detected. Got ya!.\";
    writeLog('Formtoken');
    }

    }

    ?>

    <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"
    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
    <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"fr\" lang=\"fr\">

    <head>

    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />

    <title>Website Change Request Form</title>

    <link rel=\"stylesheet\" href=\"css/jqtransform.css\" type=\"text/css\" media=\"all\" />
    <link rel=\"stylesheet\" href=\"css/style.css\" type=\"text/css\" media=\"all\" />

    <script src=\"http://www.google.com/jsapi\" type=\"text/javascript\"></script>
    <script type=\"text/javascript\">
    google.load(\"jquery\", \"1.3.2\");
    </script>

    <script type=\"text/javascript\" src=\"js/jquery.jqtransform.js\"></script>
    <script type=\"text/javascript\" src=\"js/jquery.validate.js\"></script>
    <script type=\"text/javascript\" src=\"js/jquery.form.js\"></script>

    <script type=\"text/javascript\" src=\"js/websitechange.js\"></script>

    </head>

    <?php
    // generate a new token for the $_SESSION superglobal and put them in a hidden field
    $newToken = generateFormToken('form1');
    ?>

    <body>

    <div id=\"page-wrap2\">

    <h1>Group Travel Quote Form</h1>

    <form action=\"contactform.php\" method=\"post\" id=\"change-form\">

    <div class=\"rowElem\">
    <label for=\"req-name\">Your Full Name*:</label>
    <input type=\"text\" id=\"req-name\" name=\"req-name\" class=\"required\" minlength=\"2\"
    value=\"<?php echo $_COOKIE[\"WRCF-Name\"]; ?>\" />
    </div>


    <div class=\"rowElem\">
    <label for=\"req-groupname\">Group Name*:</label>
    <input type=\"text\" id=\"req-groupname\" name=\"req-groupname\" class=\"required\" minlength=\"2\"
    value=\"<?php echo $_COOKIE[\"WRCF-groupname\"]; ?>\" />
    </div>

    <div class=\"rowElem\">
    <label for=\"req-adress\">Adress*:</label>
    <input type=\"text\" id=\"req-adress\" name=\"req-adress\" class=\"required\" minlength=\"2\"
    value=\"<?php echo $_COOKIE[\"WRCF-Adress\"]; ?>\" />
    </div>

    <div class=\"rowElem\">
    <label for=\"req-adress\">Adress*:</label>
    <input type=\"text\" name=\"req-adress\" class=\"required adress\" value=\"<?php echo $_COOKIE[\"WRCF-Adress\"]; ?>\" />
    </div>

    <div class=\"rowElem\">
    <label for=\"req-city\">City*:</label>
    <input type=\"text\" name=\"req-city\" class=\"required city\" value=\"<?php echo $_COOKIE[\"WRCF-City\"]; ?>\" />
    </div>

    <div class=\"rowElem\">
    <label for=\"req-country\">Country*:</label>
    <input type=\"text\" name=\"req-country\" class=\"required country\" value=\"<?php echo $_COOKIE[\"WRCF-Country \"]; ?>\" />
    </div>

    <div class=\"rowElem\">
    <label for=\"req-homephone\">Home Phone*:</label>
    <input type=\"text\" name=\"req-homephone\" class=\"required homephone\" value=\"<?php echo $_COOKIE[\"WRCF-Home Phone\"]; ?>\" />
    </div>

    <div class=\"rowElem\">
    <label for=\"req-businessphone\">Business Phone:</label>
    <input type=\"text\" name=\"req-businessphone\" class=\"required businessphone\" value=\"<?php echo $_COOKIE[\"WRCF-Business Phone\"]; ?>\" />
    </div>

    <div class=\"rowElem\">
    <label for=\"req-email\">Your Email*:</label>
    <input type=\"text\" name=\"req-email\" class=\"required email\" value=\"<?php echo $_COOKIE[\"WRCF-Email\"]; ?>\" />
    </div>


    <div class=\"rowElem\">
    <label for=\"req-trip\">Trip Information*:</label>
    <input type=\"text\" name=\"req-trip\" class=\"required trip\" value=\"<?php echo $_COOKIE[\"WRCF-Trip\"]; ?>\" />
    </div>

    <div class=\"rowElem\">
    <label for=\"req-size\">Proposed Group Size :</label>
    <input type=\"text\" name=\"req-size\" class=\"required size\" value=\"<?php echo $_COOKIE[\"WRCF-Size\"]; ?>\" />
    </div>


    <div class=\"rowElem\">
    <label>Size</label>

    <div id=\"changeTypeArea\">

    <input type=\"radio\" name=\"adults\" id=\"travellers\" value=\"Adults Travellers \" checked=\"checked\" />
    <label for=\"travellers\">Adults Travellers </label>

    <div class=\"clear\"></div>

    <input type=\"radio\" id=\"child11\" name=\"Child\" value=\"Child Travellers U11yrs \" />
    <label for=\"child11\">Child Travellers U11yrs </label>

    </div>

    <div class=\"clear\"></div>

    <input type=\"radio\" id=\"infant2\" name=\"infant\" value=\"Infant Travellers U2yrs\" />
    <label for=\"infant2\">Infant Travellers U2yrs </label>

    </div>



    <div class=\"rowElem\">
    <label for=\"req-pref\">Preferred Departure City:</label>
    <input type=\"text\" name=\"req-pref\" class=\"required pref\" value=\"<?php echo $_COOKIE[\"WRCF-Pref\"]; ?>\" />

    </div>

    <div class=\"rowElem\">
    <label for=\"req-date\">Proposed Travel Dates :</label>
    <input type=\"text\" name=\"req-date\" class=\"required date\" value=\"<?php echo $_COOKIE[\"WRCF-Date\"]; ?>\" />
    </div>

    <div class=\"rowElem\">
    <label for=\"req-dest\">Destination :</label>
    <input type=\"text\" name=\"req-dest\" class=\"required dest\" value=\"<?php echo $_COOKIE[\"WRCF-Dest\"]; ?>\" />
    </div>

    <div class=\"rowElem\">
    <label for=\"req-dep\">Departure Date:</label>
    <input type=\"text\" name=\"req-dep\" class=\"required dep\" minlength=\"2\" value=\"<?php echo $_COOKIE[\"WRCF-Dep\"]; ?>\" />
    </div>


    <div class=\"rowElem\">
    <label for=\"req-return\">Return Date:</label>
    <input type=\"text\" name=\"req-return\" class=\"required return\" minlength=\"2\" value=\"<?php echo $_COOKIE[\"WRCF-Return\"]; ?>\" />
    </div>




    <div class=\"rowElem\">
    <label for=\"attending\">Are you attending?:</label>
    <select name=\"attending\">
    <option value=\"Special Event\">Special Event</option>
    <option value=\"Meeting\">Meeting</option>
    <option value=\"Special Interests\">Special Interests</option>
    </select>
    </div>

    <div class=\"rowElem\">
    <label for=\"need\">Do you need?:</label>
    <select name=\"need\">
    <option value=\"Airfares\">Airfares</option>
    <option value=\"Accommodations\">Accommodations</option>
    <option value=\"Tours\">Tours</option>
    <option value=\"Sightseeing\">Sightseeing</option>
    <option value=\"Trip Budget\">Trip Budget</option>
    <option value=\"All Above\">All Above</option>
    </select>
    </div>


    <div class=\"rowElem\" id=\"newTextArea\">
    <label for=\"newText\">Comments:</label>
    <textarea cols=\"40\" rows=\"8\" name=\"newText\" class=\"required\" minlength=\"2\"></textarea>
    </div>

    <div class=\"rowElem\">
    <label> &nbsp; </label>
    <input type=\"submit\" value=\"Send Request!\" />
    </div>

    <div class=\"rowElem\">
    <label> &nbsp; </label>
    <input type=\"checkbox\" name=\"save-stuff\" />
    <label for=\"save-stuff\">&nbsp; Save Name and Email?</label>
    </div>


    </form>

    </div>
    </body>

    </html>


    Contact.php (which is the one that used to be html which I re-saved)


    </head>

    <script type=\"text/javascript\" src=\"path/to/jquery.js\"></script>
    <script type=\"text/javascript\" src=\"path/to/form.js\"></script>

    <!-- start main container for page content called wrapper -->
    <div id=\"wrapper\">
    <body>


    <div id=\"top-nav\">

    <ul id=\"nav\">
    <li class=\"home\"><a href=\"index.html\"></a></li>
    <li class=\"about\"><a href=\"about.html\"></a></li>
    <li class=\"group\"><a href=\"group.html\"></a></li>
    <li class=\"contact\"><a href=\"contact.html\"></a></li>
    </ul>
    </div>

    <div id=\"content\">


    <div id=\"left-col\">
    <h1>Contact Leader Tours <br />
    </h1>
    <p><h7>Leader Tours by Downunder Travel</h7>

    <p><h6>We are the LEADERS in GROUP TRAVEL!

    Tour Packages, Airfare, Accommodation, Tours, Sightseeing, whatever you need, we have the travel options available to suit your needs and budget. We are able to organize and personalize your Group Travel!

    Local destination knowledge and itinerary planning can really make a difference between an ordinary holiday and a fantastic holiday!</h6></p>

    [color=#FF0000][b]<?php include('contactform.php'); ?>
    [/b][/color]
    <p><h6>Our experienced and knowledgeable Group Travel Specialist Agents are able to assist you and enhance your holiday experience to the absolute maximum!</h6>

    <p>
    <h7>Call today and discuss your Group Travel Plans. </h7><h1> 1-888-485-6589</h1>
    </p>

    <p><h6><a href=\"mailto:enquired@leadertours.ca\">EMAIL US</a> – where you would like to travel on a GROUP Tour, we will see <br />
    what can be arranged.
    </p></h6>
    </div>
    <!-- END left-col -->

    <div id=\"right-col\">
    <h2><img src=\"images/indexrightlogo.jpg\" alt=\"Leader Tours Logo\"
    dth=\"195\" height=\"72\"/></h2>
    <h2>CONTACT US</h2>
    <p><br />
    Leader Tours by Downunder Travel<br />
    Lower Level, 121 14 th Street<br />
    Calgary, Alberta<br />
    Canada, T2N 1Z6<br />
    </p>
    <p>Phone: 1-888-485-6589<br />
    Email: <a href=\"mailto:enquires@leadertours.ca\">enquired@leadertours.ca</a> <br />
    <br />
    </p>
    <img src=\"images/contactone.jpg\" alt=\"Scotland\"/>

    <h2><img src=\"images/aboutfive.jpg\" alt=\"Rio de Janeiro\" width=\"201\" height=\"145\"/></h2>
    <br />
    </p>
    </div>

    <p style=\"padding-bottom: 1900px\"> </p>

    </div> <!-- END content -->

    </div> <!-- END wrapper -->

    </body>
    </html>

    JS stuff I left the same.

    Please help me and tell me what is wrong!

    THANKS IN ADVANCE!!

    RACHEL
  • Firstly, go to you contact us php file which is online, view the page source... Its missing loads compared to the code that you pasted here.
    Secondly what is this,
    [color=#FF0000][b]<?php include('contactform.php'); ?>
    [/b][/color]

    Should it not just be
    <?php include('contactform.php'); ?>

    Also, i might be wrong but i am sure that these bits of code,
    <script type=\"text/javascript\" src=\"path/to/jquery.js\"></script>
    <script type=\"text/javascript\" src=\"path/to/form.js\"></script>

    should be inside the <head> tags, not outside.
  • hello, thanks so much

    so i tried to put the site back up , but the same things is happening with it again, it stops showing code past this code

    <?php include('contactform.php'); ?> i just move lower. So something lies with the php contact form. What about my validation and js query code? What am I doing wrong? Is there another submission I can create that will work simple and effectively?

    Here is the site again. http://www.leadertours.ca/contact.php and the problem is that my contactform.php which included in the contact.php is not showing up? What do I do? Please help.



    <head>
    <link rel=\"icon\" href=\"images/favicon.png\" type=\"image/png\">
    <link rel=\"shortcut icon\" href=\"images/favicon.png\" type=\"image/png\">
    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />
    <title>Contact Us | LEADER TOURS </title>
    <link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\" />

    <script type=\"text/javascript\" src=\"path/to/jquery.js\"></script>
    <script type=\"text/javascript\" src=\"path/to/form.js\"></script>

    </head>



    <!-- start main container for page content called wrapper -->
    <div id=\"wrapper\">
    <body>


    <div id=\"top-nav\">

    <ul id=\"nav\">
    <li class=\"home\"><a href=\"index.html\"></a></li>
    <li class=\"about\"><a href=\"about.html\"></a></li>
    <li class=\"group\"><a href=\"group.html\"></a></li>
    <li class=\"contact\"><a href=\"contact.html\"></a></li>
    </ul>
    </div>

    <div id=\"content\">


    <div id=\"left-col\">
    <h1>Contact Leader Tours <br />
    </h1>
    <p><h7>Leader Tours by Downunder Travel</h7>

    <p><h6>We are the LEADERS in GROUP TRAVEL!

    Tour Packages, Airfare, Accommodation, Tours, Sightseeing, whatever you need, we have the travel options available to suit your needs and budget. We are able to organize and personalize your Group Travel!

    Local destination knowledge and itinerary planning can really make a difference between an ordinary holiday and a fantastic holiday!</h6></p>


    <p><h6>Our experienced and knowledgeable Group Travel Specialist Agents are able to assist you and enhance your holiday experience to the absolute maximum!</h6>

    <p>
    <h7>Call today and discuss your Group Travel Plans. </h7><h1> 1-888-485-6589</h1>
    </p>

    <p><h6><a href=\"mailto:enquired@leadertours.ca\">EMAIL US</a> – where you would like to travel on a GROUP Tour, we will see <br />
    what can be arranged.
    </p></h6>
    </div>
    <!-- END left-col -->

    <div id=\"right-col\">
    <h2><img src=\"images/indexrightlogo.jpg\" alt=\"Leader Tours Logo\"
    dth=\"195\" height=\"72\"/></h2>
    <h2>CONTACT US</h2>
    <p><br />
    Leader Tours by Downunder Travel<br />
    Lower Level, 121 14 th Street<br />
    Calgary, Alberta<br />
    Canada, T2N 1Z6<br />
    </p>
    <p>Phone: 1-888-485-6589<br />
    Email: <a href=\"mailto:enquires@leadertours.ca\">enquired@leadertours.ca</a> <br />
    <br />
    </p>
    <img src=\"images/contactone.jpg\" alt=\"Scotland\"/>

    <h2><img src=\"images/aboutfive.jpg\" alt=\"Rio de Janeiro\" width=\"201\" height=\"145\"/></h2>
    <br />
    </p>
    </div>


    <p style=\"padding-bottom: 1900px\"> </p>

    [b]the php ( include contact form should be here) but its not and the page code cuts off, because I have end page wrap, end body and it cuts off???)[/b]

  • Looks like you didnt close your " :D

    $headers = "From: 'rachellambo@gmail.com' ;

    should be

    $headers = "From: 'rachellambo@gmail.com' ";

    see if that helps :)