|
|
 |
 |
|
";
}
if(!preg_match($regstr, $_POST['lname'])){
$form_valid = false;
$errors .= "• Please enter your name. ";
}
if(!preg_match($regeml, $_POST['email'])){
$form_valid = false;
$errors .= "• Please enter a valid email address. ";
}
if($_POST['address'] == ""){
$form_valid = false;
$errors .= "• Please enter your address. ";
}
if($_POST['city'] == ""){
$form_valid = false;
$errors .= "• Please enter your city. ";
}
if($_POST['zip'] == ""){
$form_valid = false;
$errors .= "• Please enter your zip. ";
}
//if all checks out...
if($form_valid == true){
//...we construct and send an email...
$strMessage = $_POST['fname'] . " has signed the Petition to Implement the Universal Declaration of Human Rights.\r\n\r\n";
$strMessage .= "Name: " . $_POST['fname'] . "\r\n";
$strMessage .= "Name: " . $_POST['lname'] . "\r\n";
$strMessage .= "Email: " . $_POST['email'] . "\r\n";
$strMessage .= "Address: " . $_POST['address'];
$strMessage .= "City: " . $_POST['city'];
$strMessage .= "State: " . $_POST['state'];
$strMessage .= "Country: " . $_POST['country'];
$strMessage .= "Zip: " . $_POST['zip'];
mail('info@youthforhumanrights.org.au','YHRA Petition Signature',$strMessage,'From: ' . $_POST['email']);
//next, we sign the petition entry to a text file
//the destination file
$myFile = "petition.txt";
$string_data = $_POST['fname'] . "\t";
$string_data .= $_POST['lname'] . "\t";
$string_data .= $_POST['email'] . "\t";
$string_data .= $_POST['address'] . "\t";
$string_data .= $_POST['city'] . "\t";
$string_data .= $_POST['state'] . "\t";
$string_data .= $_POST['zip'] . "\t";
$string_data .= $_POST['country'] . "\r\n";
//prepare the file to be appended to
$fh = fopen($myFile, 'a') or die("can't open file");
//append the data
fwrite($fh, $string_data);
//close the file
fclose($fh);
//
//this part increments the counter (how many have signed)
//
//the counter text file
$myFile = "counter.txt";
//read the current value
$fc = fopen($myFile, 'r+') or die("can't open file");
$count = (int) fread($fc, 20);
//close the file
fclose($fc);
//increment the counter
$count++;
//increment the value in the file
$fc = fopen($myFile, 'w') or die("can't open file");
fwrite($fc, $count);
//close the file
fclose($fc);
//...then, we display the thank you message.
?>
Thank You for Signing the Human Rights Education Petition
You are the person to sign the petition.

NOW GET INVOVLED
Make Human Rights a Reality
Create an Email Chain Reaction!
You can copy this link and email it to the contacts in your address
book to get them to sign and send the link on to all of their contacts.
http://www.youthforhumanrights.org.au/getactive/petition.php4
PETITION
to implement the
Universal Declaration of Human Rights

PETITION
to implement the
Universal Declaration of Human Rights
|
We the undersigned citizens hereby state:
THAT abuses of human rights are a widespread problem and give rise to ethnic, racial and religious conflicts,
THAT in 1948, the United Nations adopted the Universal Declaration of Human Rights which is now endorsed by all nations of the world,
THEREFORE, we urge that this Declaration be broadly displayed and promoted; with human rights education made available to children and adults throughout the world.
|

|
|
|
|