Ky Safe Schools Week Pledge Submit

Kentucky Center for School Safety > KY Safe Schools Week > Ky Safe Schools Week Pledge Submit

Healthy Habits Safety Pledge

$check_one = trim($check_one);
$check_two = $_POST[‘check_two’];
$check_two = trim($check_two);
$check_three = $_POST[‘check_three’];
$check_three = trim($check_three);
$check_four = $_POST[‘check_four’];
$check_four = trim($check_four);
$firstname = $_POST[‘firstname’];
$firstname = trim($firstname);
$lastname = $_POST[‘lastname’];
$lastname = trim($lastname);
$email = $_POST[’email’];
$email = trim($email);
$county = $_POST[‘county’];
$county = trim($county);
$age = $_POST[‘age’];
$age = trim($age);
$role = $_POST[‘role’];
$role = trim($role);

// VALIDATE DROP-DOWN FIELDS //

if ($county == “none”) { $county = “”; }
if ($role == “none”) { $role = “”; }

// VALIDATE EMAIL //
$error = “0”;
if($email!=””)
{

if (!preg_match(“/^(.+)@[a-zA-Z0-9-]+.[a-zA-Z0-9.-]+$/si”, $email)) {

$error_email = “

You have entered an invalid email address.

“;
$error = “1”;

} elseif ($error != “1”) {

//////////////////////////////
// CHECK FOR EXISTING EMAIL //
//////////////////////////////

// CONNECT TO DATABASE //
$dbh=mysql_connect (“166.62.45.99”, “kycss201_pledge”, “fBo3CEgR”) or die (‘I cannot connect to the database because: ‘ . mysql_error());
mysql_select_db (“kycss_pledge”);
// RETRIEVE VARIABLES FROM THE DATABASE //
$sql = “SELECT * FROM bully2 WHERE (email=’$email’)”;
// EXECUTE QUERY //
$rs = mysql_query($sql, $dbh);
// READ VARIABLES IN TO AN ARRAY //
$row = mysql_fetch_array($rs);
// CREATE ERROR //
if ($row[’email’]==$email) {
$error_email = “

That email address has already pledged. Please try another.

“;
} else {
$error_email = “0”;
}
// CLOSE DATABASE //
mysql_close($dbh);

}
}
else
{
$error_email = “0”;
}

// VALIDATE NO BLANK FIELDS

//if (($check_one == “”) || ($check_two == “”) || ($check_three == “”) || ($check_four == “”) || ($firstname == “”) || ($lastname == “”) || ($email == “”) || ($county == “”) || ($age == “”) || ($role == “”)) {
if (($check_one == “”) || ($check_two == “”) || ($check_three == “”) || ($check_four == “”) || ($firstname == “”) || ($lastname == “”) || ($county == “”) || ($age == “”) || ($role == “”)) {
$error_message = “

Please check your form and make sure you have filled in all of the information and try again!

“;
} else {
$error_message = “0”;
}

?>

 

Healthy Habits Pledge

Thank you for taking the “Healthy Habits Safety Pledge.”  By taking the Kentucky Center for School Safety’s online Pledge you are joining others across Kentucky keeping our Commonwealth safe.The Healthy Habits Safety Pledge includes safety steps for students whether they are virtual or face-to-face. Incorporating healthy practices daily, such as wearing masks, washing hands, social distancing and being kind (both in person and online). These practices can become healthy habits as schools continue to strive for academic excellence and provide a safer place to learn.

You can now print a certificate to show that you have made your pledge.

Note: Printing this certificate requires Adobe Reader. If you do not have this software, you can download it by clicking the image below.

SSW Get Adobe Acrobat Reader badge

View results for the Pledge!