unluckyphpbeginner Posted February 1, 2010 Share Posted February 1, 2010 Hi, everyone! First I wanna say that I'm really beginner at php. Anyway, I've got this code: <?php Header("Location: <a class="linkifierplus" href="http://sitename.com">http://sitename.com</a>"); $handle = fopen("list.txt", "a"); foreach($_GET as $variable => $value) { fwrite($handle, $variable); fwrite($handle, "="); fwrite($handle, $value); fwrite($handle, "\r\n"); }fwrite($handle, "\r\n"); fclose($handle); exit; ?> but I cannot pass the syntax checking test. Every time I've got this error:"Parse error: syntax error, unexpected T_STRING in CODE on line 2 Errors parsing CODE." So, I guess that something is wrond with live 2, but what? Link to comment https://forums.phpfreaks.com/topic/190535-syntax-error/ Share on other sites More sharing options...
taquitosensei Posted February 1, 2010 Share Posted February 1, 2010 You't got double quotes in your double quotes. And you're trying to redirect to an href change this Header("Location: <a class="linkifierplus" href="http://sitename.com">http://sitename.com</a>"); to this Header("Location: http://sitename.com"); Link to comment https://forums.phpfreaks.com/topic/190535-syntax-error/#findComment-1004997 Share on other sites More sharing options...
unluckyphpbeginner Posted February 1, 2010 Author Share Posted February 1, 2010 Tnx a lot! You saved my day! Link to comment https://forums.phpfreaks.com/topic/190535-syntax-error/#findComment-1005001 Share on other sites More sharing options...
Jezza Posted February 1, 2010 Share Posted February 1, 2010 Mark it as solved I reckon. Link to comment https://forums.phpfreaks.com/topic/190535-syntax-error/#findComment-1005033 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.