Log in

View Full Version : Parse error



thewebmacster
01-05-2007, 02:56 AM
Good Day, I need some help, please teach me why I'm getting this message:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in .../tzn_user.php on line 109

$str = <<<EOS
<script type="text/javascript" language="javascript">
var tzo=(new Date().getTimezoneOffset()*60)*(-1);
document.write('<input type="hidden" name="$name" value="'+tzo+'" />');
</script>
EOS;
print $str;
}
Line 109 is the line with EOS;

Could anyone tell me what the error is?
:eek:

thetestingsite
01-05-2007, 03:06 AM
What's the rest of the code, because it could be anything leading up to that line that is causing the error.

thewebmacster
01-05-2007, 03:23 AM
Thank you, I figured it out. You may delete this entry.