Hi There,
Im trying to get this if statement to work but it keeps coming up with the following error when the page tries to load, I want it to check if a code has been entered correctly and if it has then to write the e-mail address to the txt file.
can anyone point out what im doign wrong?
The error message i am receiving is:
Parse error: syntax error, unexpected T_LOGICAL_AND in /home/public_html/members-area.php on line 20
I have tried putting && and AND but these just bring up different errors each time.
<?
$valcode=$_POST['vcode'];
$fn = "email.txt";
$file = fopen($fn, "a+");
$size = filesize($fn);
if($_POST['email']) and ($valcode=="1902")
{
fwrite($file, $_POST['email']."; ");
fclose($file);
$message ="<p class='number'>Thank you, you will receive an e-mail with your user login and password shortly. Please check your junk mail if you do not receive an e-mail.</p>";
} else {
$message ="<p class='number'>Your validation code did not match that on our records, please re-enter and try again, if you keep encountering this problem please contact us.</p>";
}
?>
IF anyone could help, it would be great!
Thanks
Chris