MasterACE14 Posted June 16, 2007 Share Posted June 16, 2007 I have created a very basic and noobie News script. (highly user friendly) but I am receiving the following error. Parse error: parse error, unexpected T_VARIABLE in C:\WebServer\Abyss Web Server\htdocs\php test scripts\news.php on line 51 heres is the entire script. <?php /////////////////////////////////// // News Page // // Created by ACE - 2007 // /////////////////////////////////// //============================================================================================================================================================= // --------------------- // Configuration //---------------------- //============================================================================================================================================================= // Put in your websites name, example: Google $websitename = "Google"; // Put in what color you want your background to be. Note: must be hexadecimal. Example: 000000 , that would make a black background $backgroundcolor = "000000"; // Put in what you want the Text Color to be. Note: must be hexadecimal. Example: FFFFFF , that would make the text color white $textcolor = "FFFFFF"; // Put in what color you want active hyperlinks to be. Note: must be hexadecimal. Example: FF0000 , that would make active hyperlinks gold $link = "FF0000"; // Put in what color you want Visited Links to be. Note: must be hexadecimal. Example: 00FF00 , that would make visited links lime/green $vlink = "00FF00"; //============================================================================================================================================================= // --------------------- // News Information //---------------------- //============================================================================================================================================================= // Put in your name, or Alias. Example: John $name = "John"; // Put in your News. Note: Can be of pretty much any length. Note: you can also put in <br> within your news message, <br> does a line break so you can use that to neaten your news. // Example: Welcome to my Website,<br> This is my new News section created by ACE.<br> Which is where I will display News! $news = "Welcome to my Website,<br> This is my new News section created by ACE.<br> Which is where I will display News!"; ?> <!-- This News Page was created by ACE, 2007 --> <html> <head> <title><?php$websitename?> - News</title> </head> <body text="#<?php$textcolor?>" link="#<?php$link?>" vlink="#<?php$vlink?>" bgcolor="#<?php$backgroundcolor?>"> <center> <u><h3><?phpecho($websitename);?> - News</h3></u> <hr> <br> <?php <i>echo($name);</i><br><br> echo($news);<br><br> ?> <hr> <i>brought to you by <?phpecho($websitename);?></i> </center> </body> </html> Can someone please tell me what is causing the error? and please no harsh criticism about the coding i know its crap, but i'm just a beginner. Regards ACE Quote Link to comment Share on other sites More sharing options...
chigley Posted June 16, 2007 Share Posted June 16, 2007 <title><?php echo $websitename; ?> - News</title> Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted June 16, 2007 Author Share Posted June 16, 2007 Thankyou for the fast reply. I edited the title. but now I am getting the same error, but on line 53 Regards ACE Quote Link to comment Share on other sites More sharing options...
taith Posted June 16, 2007 Share Posted June 16, 2007 thats cuz you have the same errors there too... Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted June 16, 2007 Author Share Posted June 16, 2007 excellant, I went through and changed all the <?php$variables?> to <?=$variables?> and it works perfectly now. Thanks heaps Regards ACE Quote Link to comment Share on other sites More sharing options...
dbillings Posted June 16, 2007 Share Posted June 16, 2007 It shouldn't work perfectly. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.