|
Hello,
I have created an area on my site where people can tell a friend about the site. The script worked fine, but you could leave all the fields blank and no error message would appear, so it was pretty basic. I have tried to add an If and Else function, but keep getting an error: "Parse error: parse error, unexpected T_BOOLEAN_OR, expecting ')' in /home/randomsh/public_html/Tell-done.php on line 605"
This is the section of the script with the problem:
if (empty($friendemail || friendname || yourmessage || yourname));
echo "Please pretty back and make sure you fill in all the fields";
else {mail($to, $sub, $mes, $headers);
echo "<center>Thank you $yourname,<br>Your message has been sent to your friend $friendname</center>"; }
Anyone got an ideas?
Many thanks
Chris Harris
|