Why does my PHP mailing code always give:
syntax error, unexpected \'Â Â Â Â \' (T_STRING) in C:\\xampp\\htdocs\\GSP\\members.php on line 4
I see some errors in your code:
Try replacing:
$email_to = 'kennydharmawan@gmail.com';
With:
$email_to = "kennydharmawan@gmail.com";
And in this line:
echo "Thank you for contacting us. We will be in touch with you very soon."
Your are missing an ";", so fixed it:
echo "Thank you for contacting us. We will be in touch with you very soon.";
PS: Try replacing all your single quotes with double quotes( '' with "") i all your strings vars ;)
Saludos.
Your problem is that the PHP file has been saved with exotic white space characters -- ie not standard spaces, but some other characters that are rendered as spaces (or even not shown at all), but are unparseable by PHP.
Delete all the white space characters on lines 3 and 4, re-type them, and save the file. (that's all white space, including line feeds and spaces between words)
This should solve the problem.
If after doing this, you still get the error, but on a different line, then you will need to repeat the process for that line too.