Code:
<?php
if (isset($_POST['submit'])){
$error = array()
if (empty($_POST['mail'])) {
$error[] = 'Please Enter your Email and also confirm your mail';
} else {
if (preg_match("/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/", $_POST['mail'])) {
$Email = $_POST['mail'];
} else {