_Xternal34
01-05-2007, 02:27 AM
K i have no idea what's wrong with this. Everything seems to work fine.
<?php
$to = "emopwns@gmail.com";
$subject = "Subject";
$txt = "IP:" .{$_SERVER["REMOTE_ADDR"]};
mail($to,$subject,$txt);
?>
it comes out parse error on line 5, plz help
CFMaBiSmAd
01-05-2007, 02:52 AM
The actual parse error message probably contains information on what is wrong (it should have been something like - Parse error: parse error, unexpected '{' in C:\Program Files\Apache Group\Apache2\htdocs\yourfile.php on line 5), but the { and } surrounding the variable are only used when a variable is contained within a double-quoted string, which it is not in this code.
Edit: We only see what you post. To receive the best help, always post actual code and actual error messages. Anything else just turns this into a 20 question guessing game and causes wild goose chases.
_Xternal34
01-05-2007, 03:09 AM
There's no unexpected { or whatever. Just the simple
Parse error: parse error in c:\program files\easyphp1-8\www\aimqueef.php on line 5
_Aerospace_Eng_
01-06-2007, 04:31 PM
Did you read CFMaBiSmAd's post about the brackets not being needed unless inside double quotes?
<?php
$to = "emopwns@gmail.com";
$subject = "Subject";
$txt = "IP:" . $_SERVER["REMOTE_ADDR"];
mail($to,$subject,$txt);
?>
Try that.