Your Name is Required"); if (chk_wds($yourname)) $errors[] = ("
  • You have placed a link or inappropriate language in your name field
  • "); if (empty($youremail)) $errors[] = ("
  • Your Email is Required
  • "); if (!empty($youremail)){if (!chk_eml($youremail)) {$errors[] = ("
  • Your email is not a valid email address
  • ");}} if (empty($friendname)) $errors[] = ("
  • Your Friends Name is Required"); if (chk_wds($friendname)) $errors[] = ("
  • You have placed a link or inappropriate language in friends name field
  • "); if (empty($friendemail)) $errors[] = ("
  • Your Friends Email is Required
  • "); if (!empty($friendemail)){if (!chk_eml($friendemail)) {$errors[] = ("
  • Your friends email not a valid email address
  • ");}} if (chk_wds($message)) $errors[] = ("
  • You have placed a link or inappropriate language in the comments field
  • "); $body = $_POST['friendname'].",

    "; $body .= $_POST['yourname']. " wants you to check out idance.ca page at http://www.idance.ca

    "; $body .= $_POST['yourname']." also says...
    "; $body .= $_POST['message']."

    "; $body .= "If you do not know ".$_POST['yourname']; $body .= ", please ignore this message or report it to shawn@idance.ca

    "; $body .= "Warmest Regards,
    "; $body .= "Shawn Silver
    "; if (count($errors)) $have_errors = true; if (!$have_errors){ include_once("Mail.php"); $to = $friendemail; $from = $youremail; $headers["From"] = $from; $headers["To"] = $to; $headers["Subject"] = "Checkout iDance.ca"; $headers["Content-Type"] = "text/html"; $params["host"] = 'smtp002.websoon.com'; $params["port"] = "25"; $params["auth"] = true; $params["username"] = 'shawn@idance.ca'; $params["password"] = "4everFLY"; $mail_object =& Mail::factory("smtp", $params); $mail_object->send($to, $headers, $body); $response = "

    Thank you for recommending idance.ca to ".$friendname."
    Your email has been sent.
    Would you like to recommend idance.ca to another friend, family member, or colleague?
    Just use the form below like you did before and simply change the email address.

    "; } } ?>

    Tell a Friend!

    "; foreach($errors as $error => $err) { print $err; } print ""; } ?>
    Please fill out the form.
    An automated message is already included, so any additional comments can be inserted in the Comments(Optional) field.


    *Your name:  
    *Your e-mail address:  
    *Your friend's name:  
    *Your friend's e-mail address:  
    Your message:(Optional)