Need quick help, if anyone can...
I have a quite simple html one page with form and I'm trying to validate it with php (check blanks and verify email) for some reason something going wrong and it doesn't show me anything on action form
anyone have any idea? will really help me a lot. the icons present the obvious (the text is hebrew) (if someone knows how to validate phone, bless you as well)
the html:
<!DOCTYPE html>
<html lang="he" dir="rtl">
<head>
<title>Safari Company</title>
<meta charset="utf-8"/>
<link rel="stylesheet" type="text/css" href="styles.css">
<script src="js/script.js"></script>
</head>
<body>
<div id="top-wrapper">
<div id="top-background">
<p class="image-text">.אפריקה. נקודת מבט חדשה</p>
<p class="credit-english">Ziv Koren</p>
</div>
</div>
<div id="costumer-wrapper">
<div id="info-for-client">
<p class="secondary-text">הדרך לאפריקה מתחילה בטיסה ישירה לטנזניה</p>
<p class="offer-text">פסח 2015 <span>|</span> 9 ימים מלאים</p>
<p class="ratz-border-above">ספארי קומפני בטיסת (סאנדור) אל-על ישירה לטנזניה וחזרה ישירות מזנזיבר. מבחר תוכניות ספארי מותאמות באופן אישי.</p>
<p class="strong">תמיד אמרתם שפעם תעשו את זה. עכשיו זה הזמן</p>
<p class="secondary-text">למידע נוסף, התאמת ספארי אישי </br> והזמנות 03-5617021</p>
</div>
<form method="post" action="confirmation.php" name="myForm" onsubmit="return validate();">
<input type="text" class="name" name="Name" placeholder="שם">
<input type="text" class="email" name="Email" placeholder="דוא״ל" >
<input type="text" class="phone" name="Phone" placeholder="טלפון" >
<textarea placeholder="הערות"></textarea>
<input type="checkbox" > ארצה לקבל עדכונים וחדשות
<button type="submit"> שלח</button>
</form>
<p class="hebrew-credit">זהות ושפה - מוסנזון פורת</p>
</div>
<div id="bottom-background">
<div id="bottom-image"> </div>
<p class="credit-english"></p>
</div>
<div id="footer-wrapper">
<footer>
<p>ספארי, בשפה הסווהילית, פירושו מסע, בשפה שלנו, מסע פירושו יציאה לדרך של גילויים חדשים, מראות, ריחות, טעמים.</br>
תחושה שאין דומה לה. לגלות את אפריקה, בכל פעם מחדש, כבר 20 שנה. נשמח להיות הדרך שלכם לאפריקה.</p>
<p class="adress-border-above"> סעדיה גאון 24, תל אביב טל. 03-5617021 פקס. 15335468614 <span> | www.safaricompany.co.il | info@safaricompany.co.il</span></p>
<a href="#"><img src="images/logo.png"></a>
</footer>
</div>
</body>
<script>
function validate(){
if( document.myForm.Name.value == "" )
{
alert( "Please provide your name" );
document.myForm.Name.focus() ;
return false;
}
if( document.myForm.Email.value == "" )
{
alert( "Please provide your Email" );
document.myForm.Email.focus() ;
return false;
}
if( document.myForm.Phone.value == "" )
{
alert( "Please provide your Phone" );
document.myForm.Phone.focus() ;
return false;
}
return true;
}
</script>
</html>
the php:(confirmation.php)
<?php
if($_SERVER["REQUEST_METHOD"] == "POST"){
$name = trim($_POST["Name"]);
$email = trim($_POST["Email"]);
$phone = trim($_POST["Phone"]);
if( $name == "" || $email=="" || $phone==""){
echo "Please fill name, email and phone";
exit;
}
require_once("Inc/phpmailer/class.phpmailer.php");
$mail = new PHPMailer();
if(!$mail -> ValidateAddress($email)){
echo "You must specify a valid email.";
exit;
}
?>
<html>
<body>
Welcome <?php echo $_POST["Name"]; ?><br>
Your email address is: <?php echo $_POST["Email"]; ?>
</body>
</html>