Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 06-14-2011, 04:26 AM   #1
LQ Newbie
Registered: Jun 2011
Posts: 1

Rep: Reputation: Disabled
Parse error: syntax error, unexpected '@' in php code

Parse error: syntax error, unexpected '@' in C:\xampp\htdocs\minippro\mail.php on line 8 .......its not recognizing the '@' symbol. im a beginner in php so plz do help out. heres the code im working with

<?php $receiver =; $subject = wish; $content = Hi! My dear friend how are you.; $sender = myself@ ; $headers = From: $sender; mail($receiver,$subject, $content,$headers); echo Mail has been sent successfully.; ?>

Last edited by minipro; 06-14-2011 at 04:31 AM.
Old 06-14-2011, 04:33 AM   #2
Senior Member
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 249Reputation: 249Reputation: 249
Try using double quotes around your variable values.
$receiver = "";
$subject = "wish";
$content = "Hi! My dear friend how are you.";
And please use the code tags when posting code.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Parse error: parse error, unexpected '/' - can anyone see the error in this code? v@ny@ Programming 8 04-03-2010 04:07 PM
Parse error: syntax error, unexpected T_STRING in /home/dodonet2/public_html/includes bestbuddy Linux - Newbie 8 01-10-2010 08:31 PM
What is a Parse Error: syntax unexpected $end in Viewtopic_body.html.php sonia510 Programming 2 10-01-2009 04:43 PM
Parse error syntax error unexpected '{ ' on line chakaox Programming 2 04-29-2009 03:27 AM
PHP Error Parse error: parse error, unexpected $ in /home/content/S/k/i/SkinCare4U/h CowanServices Programming 2 12-09-2008 08:26 PM

All times are GMT -5. The time now is 12:46 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration