cameeob2003 Posted July 19, 2006 Share Posted July 19, 2006 Here is the error im getting:[quote]Parse error: parse error, unexpected T_BREAK, expecting ',' or ';' in /homepages/34/d154144477/htdocs/ventgaming/n2p/pages.php on line 89[/quote]Here is the script im using:[code]<?php include("config/db.php"); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Nothing to Prove - Gaming Organization</title><meta name="copyright" content="Copyright by VentGaming Code[er]s - All rights reserved." /><meta name="page-type" content="Info" /><link rel="stylesheet" href="n2p.css" type="text/css" /><style type="text/css"><!--a:link { color: #000000; text-decoration: none;}a:visited { text-decoration: none; color: #000000;}a:hover { text-decoration: underline; color: #000000;}a:active { text-decoration: none; color: #000000;}--></style></head><body><?phpfunction getpage($showpage) { switch ($showpage) { case "home": $sql = "SELECT * FROM `news` order by `id` DESC LIMIT 0,4"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_assoc($result)) { $title = $row['title']; $author = $row['author']; $date = $row['date']; $content = $row['content']; $img = $row['img']; $id = $row['id']; echo '<table> <tr> <td width="534">'. $img .'</td></tr></table><table><tr><td width="395">'. $title .'</td><td width="135">'. $author .' Date: '. $date .'</td></tr></table><table><tr><td width="534">'. $content .'</td></tr></table>';} break; case "achieves": $sql = "SELECT * FROM `news` order by `id`"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_assoc($result)) { $title = $row['title']; $author = $row['author']; $date = $row['date']; $id = $row['id']; echo '<center><table width="534"><tr><td>'. $title .'</td><td>'. $author .'</td><td>'. $date .'</td></tr></table></center>';} break; case "forum": echo 'The forums section is currently under development please check back later.'; break; // <<<<---------------------- Line 89 case "roster": break; case "matches": $sql = "SELECT * FROM `matches` order by `id`"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_assoc($result)) { $opponent = $row['opponent']; $description = $row['description']; $date = $row['date']; $score_one = $row['score_one']; $score_one = $row['score_one']; $id = $row['id']; echo '<center><table width="534" bgcolor="#000000"><tr><td bgcolor="#000000"><font color="#FFFFFF"> '. $id .' </font></td><td bgcolor="#000000"><font color="#FFFFFF"> '. $opponent .' </font></td><td bgcolor="#000000"><font color="#FFFFFF"> '. $description .' </font></td><td bgcolor="#000000"><font color="#FFFFFF"> '. $date .' </font></td><td bgcolor="#000000"><font color="#00FF00"> '. $score_one .'</font><font color="#FFFFFF"> -</font><font color="#FF0000"> '. $score_two .' </font></td></tr></table></center>';} break; case "media": $sql = "SELECT * FROM `media` order by `id`"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_assoc($result)) { $title = $row['title']; $description = $row['description']; $date = $row['date']; $id = $row['id']; echo '<center><table width="534" bgcolor="#000000"><tr><td bgcolor="#000000"><font color="#FFFFFF"> '. $id .' </font></td><td bgcolor="#000000"><font color="#FFFFFF"> '. $title .' </font></td><td bgcolor="#000000"><font color="#FFFFFF"> '. $description .' </font></td><td bgcolor="#000000"><font color="#FFFFFF"> '. $date .' </font></td></tr></table></center>';} break; case "proshop": $sql = "SELECT * FROM `proshop` order by `id`"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_assoc($result)) { $img = $row['img']; $title = $row['name']; $manufacturer = $row['manufacturer']; $description = $row['description']; $price = $row['price']; $id = $row['id']; echo '<center><table width="534" bgcolor="#000000"><tr><td bgcolor="#000000"><font color="#FFFFFF"> '. $img .' </font></td><td bgcolor="#000000"><font color="#FFFFFF"> '. $name .' </font></td><td bgcolor="#000000"><font color="#FFFFFF"> '. $manufacturer .' </font></td><td bgcolor="#000000"><font color="#FFFFFF"> '. $description .' </font></td><td bgcolor="#000000"><font color="#FFFFFF"> '. $price .' </font></td></tr></table></center>';} break; case "lessons": echo '<center><table width="534" bgcolor="#CCCCCC"><tr><td></td><td bgcolor="#CCCCCC"><font id=text/>Game</td><td bgcolor="#CCCCCC"><font id=text/>Teacher</td><td bgcolor="#CCCCCC"><font id=text/>Price Per Hour</td></tr>'; $sql = "SELECT * FROM `lessons` order by `id`"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_assoc($result)) { $img = $row['img']; $game = $row['game']; $teacher = $row['teacher']; $price = $row['price']; $id = $row['id']; echo '<tr> <td bgcolor="#CCCCCC"><font id=text/>'. $img .'</td> <td bgcolor="#CCCCCC"><font id=text/>'. $game .'</td> <td bgcolor="#CCCCCC"><font id=text/>'. $teacher .'</td> <td bgcolor="#CCCCCC"><font id=text/>'. $price .'</td> <td bgcolor="#CCCCCC"><font id=text/><a href="order.php?page=lessons">Order</a></td>';} echo '</table></center>'; break; case "demos": echo '<table bgcolor="#CCCCCC"><tr> <td bgcolor="#CCCCCC"><font id=text/>Title</td> <td bgcolor="#CCCCCC"><font id=text/>Description</td> <td bgcolor="#CCCCCC"><font id=text/>Length</td> <td bgcolor="#CCCCCC"><font id=text/>Size</td> <td bgcolor="#CCCCCC"><font id=text/>Download</td> </tr>'; $sql = "SELECT * FROM `demos` order by `id`"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_assoc($result)) { $title = $row['title']; $description = $row['description']; $length = $row['length']; $size = $row['size']; $id = $row['id']; echo '<table><tr> <td bgcolor="#CCCCCC"><font id=text/>'. $title .'</td> <td bgcolor="#CCCCCC"><font id=text/>'. $decription .'</td> <td bgcolor="#CCCCCC"><font id=text/>'. $length .'</td> <td bgcolor="#CCCCCC"><font id=text/>'. $size .'</td> <td bgcolor="#CCCCCC"><font id=text/><a href="download.php?get=$id">Download</td> </tr></table>';} break; case "gallery": break; case "sponsors": echo ''; break; case "aboutus": echo '<table width="535"><font id="text" />n2p is a gaming organization established in 1999. Over time we have become one of the most respected organizations in the gaming community. We have big plans ahead and are always looking for those who support us to continue to support us.</table>'; break; }}getpage($_GET['page']);?></body></html>[/code]Any help is appreciated Quote Link to comment Share on other sites More sharing options...
akitchin Posted July 19, 2006 Share Posted July 19, 2006 rather than making us count, why don't you tell us what line 89 is? that often helps us narrow down the problem faster.[b]EDIT: my mistake, didn't notice the comment.[/b] Quote Link to comment Share on other sites More sharing options...
cameeob2003 Posted July 19, 2006 Author Share Posted July 19, 2006 I did it is commented next to the line "// <<<<---------------------- Line 89" Quote Link to comment Share on other sites More sharing options...
hvle Posted July 19, 2006 Share Posted July 19, 2006 you should echo a block of html with embedded $var like this:[code]echo <<<BLOCK<table><tr> <td bgcolor="#CCCCCC"><font id=text/>$title</td> <td bgcolor="#CCCCCC"><font id=text/>$decription</td> <td bgcolor="#CCCCCC"><font id=text/>$length</td> <td bgcolor="#CCCCCC"><font id=text/>$size</td> <td bgcolor="#CCCCCC"><font id=text/><a href="download.php?get=$id">Download</td> </tr></table>BLOCK;[/code] Quote Link to comment Share on other sites More sharing options...
hvle Posted July 19, 2006 Share Posted July 19, 2006 I ran your code, and i did not get an error!hehehe Quote Link to comment Share on other sites More sharing options...
cameeob2003 Posted July 19, 2006 Author Share Posted July 19, 2006 I revised the code but still get the same error:[quote]Parse error: parse error, unexpected T_BREAK, expecting ',' or ';' in /homepages/34/d154144477/htdocs/ventgaming/n2p/pages.php on line 89[/quote]here is my code atm:[code]<?php include("config/db.php"); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Nothing to Prove - Gaming Organization</title><meta name="copyright" content="Copyright by VentGaming Code[er]s - All rights reserved." /><meta name="page-type" content="Info" /><link rel="stylesheet" href="n2p.css" type="text/css" /><style type="text/css"><!--a:link { color: #000000; text-decoration: none;}a:visited { text-decoration: none; color: #000000;}a:hover { text-decoration: underline; color: #000000;}a:active { text-decoration: none; color: #000000;}--></style></head><body><?phpfunction getpage($showpage) { switch ($showpage) { case "home": $sql = "SELECT * FROM `news` order by `id` DESC LIMIT 0,4"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_assoc($result)) { $title = $row['title']; $author = $row['author']; $date = $row['date']; $content = $row['content']; $img = $row['img']; $id = $row['id']; echo <<<BLOCK <table> <tr> <td width="534">$img</td></tr></table> <table> <tr> <td width="395">$title</td> <td width="135">$author Date: $date</td> </tr> </table> <table> <tr> <td width="534">$content</td> </tr> </table> BLOCK;} break; case "achieves": $sql = "SELECT * FROM `news` order by `id`"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_assoc($result)) { $title = $row['title']; $author = $row['author']; $date = $row['date']; $id = $row['id']; echo <<<BLOCK <center> <table width="534"> <tr> <td>$title</td> <td>$author</td> <td>$date</td> </tr> </table></center> BLOCK;} break; case "forum": // print 'The forums section is currently under development please check back later.'; break; // <<<----- Still getting error here case "roster": break; case "matches": $sql = "SELECT * FROM `matches` order by `id`"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_assoc($result)) { $opponent = $row['opponent']; $description = $row['description']; $date = $row['date']; $score_one = $row['score_one']; $score_one = $row['score_one']; $id = $row['id']; echo <<<BLOCK <center> <table width="534" bgcolor="#000000"> <tr> <td bgcolor="#000000"><font color="#FFFFFF"> $id </font></td> <td bgcolor="#000000"><font color="#FFFFFF"> $opponent </font></td> <td bgcolor="#000000"><font color="#FFFFFF"> $description </font></td> <td bgcolor="#000000"><font color="#FFFFFF"> $date </font></td> <td bgcolor="#000000"><font color="#00FF00"> $score_one </font><font color="#FFFFFF"> - </font><font color="#FF0000"> $score_two </font></td> </tr> </table></center> BLOCK; } break; case "media": $sql = "SELECT * FROM `media` order by `id`"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_assoc($result)) { $title = $row['title']; $description = $row['description']; $date = $row['date']; $id = $row['id']; echo <<<BLOCK <center> <table width="534" bgcolor="#000000"> <tr> <td bgcolor="#000000"><font color="#FFFFFF"> $id </font></td> <td bgcolor="#000000"><font color="#FFFFFF"> $title </font></td> <td bgcolor="#000000"><font color="#FFFFFF"> $description </font></td> <td bgcolor="#000000"><font color="#FFFFFF"> $date </font></td> </tr> </table></center> BLOCK; } break; case "proshop": $sql = "SELECT * FROM `proshop` order by `id`"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_assoc($result)) { $img = $row['img']; $title = $row['name']; $manufacturer = $row['manufacturer']; $description = $row['description']; $price = $row['price']; $id = $row['id']; echo <<<BLOCK <center> <table width="534" bgcolor="#000000"> <tr> <td bgcolor="#000000"><font color="#FFFFFF"> $img </font></td> <td bgcolor="#000000"><font color="#FFFFFF"> $name </font></td> <td bgcolor="#000000"><font color="#FFFFFF"> $manufacturer </font></td> <td bgcolor="#000000"><font color="#FFFFFF"> $description </font></td> <td bgcolor="#000000"><font color="#FFFFFF"> $price </font></td> </tr> </table></center> BLOCK; } break; case "lessons": echo <<<BLOCK <center><table width="534" bgcolor="#CCCCCC"><tr><td></td><td bgcolor="#CCCCCC"><font id=text/>Game</td><td bgcolor="#CCCCCC"><font id=text/>Teacher</td><td bgcolor="#CCCCCC"><font id=text/>Price Per Hour</td></tr>BLOCK; $sql = "SELECT * FROM `lessons` order by `id`"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_assoc($result)) { $img = $row['img']; $game = $row['game']; $teacher = $row['teacher']; $price = $row['price']; $id = $row['id']; echo <<<BLOCK <tr> <td bgcolor="#CCCCCC"><font id=text/> $img </td> <td bgcolor="#CCCCCC"><font id=text/> $game </td> <td bgcolor="#CCCCCC"><font id=text/> $teacher </td> <td bgcolor="#CCCCCC"><font id=text/> $price </td> <td bgcolor="#CCCCCC"><font id=text/><a href="order.php?page=lessons">Order</a></td> BLOCK; } echo <<<BLOCK </table></center> BLOCK; break; case "demos": echo <<<BLOCK <table bgcolor="#CCCCCC"><tr> <td bgcolor="#CCCCCC"><font id=text/>Title</td> <td bgcolor="#CCCCCC"><font id=text/>Description</td> <td bgcolor="#CCCCCC"><font id=text/>Length</td> <td bgcolor="#CCCCCC"><font id=text/>Size</td> <td bgcolor="#CCCCCC"><font id=text/>Download</td> </tr> BLOCK; $sql = "SELECT * FROM `demos` order by `id`"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_assoc($result)) { $title = $row['title']; $description = $row['description']; $length = $row['length']; $size = $row['size']; $id = $row['id']; echo <<<BLOCK <table><tr> <td bgcolor="#CCCCCC"><font id=text/> $title </td> <td bgcolor="#CCCCCC"><font id=text/> $decription </td> <td bgcolor="#CCCCCC"><font id=text/> $length </td> <td bgcolor="#CCCCCC"><font id=text/> $size </td> <td bgcolor="#CCCCCC"><font id=text/><a href="download.php?get=$id">Download</td> </tr></table> BLOCK;} break; case "gallery": break; case "sponsors": echo ''; break; case "aboutus": echo <<<BLOCK <table width="535"><font id="text" />n2p is a gaming organization established in 1999. Over time we have become one of the most respected organizations in the gaming community. We have big plans ahead and are always looking for those who support us to continue to support us.</table> BLOCK; break; }}getpage($_GET['page']);?></body></html>[/code] Quote Link to comment Share on other sites More sharing options...
redarrow Posted July 19, 2006 Share Posted July 19, 2006 Try this ok[code]<?php include("config/db.php"); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Nothing to Prove - Gaming Organization</title><meta name="copyright" content="Copyright by VentGaming Code[er]s - All rights reserved." /><meta name="page-type" content="Info" /><link rel="stylesheet" href="n2p.css" type="text/css" /><style type="text/css"><!--a:link { color: #000000; text-decoration: none;}a:visited { text-decoration: none; color: #000000;}a:hover { text-decoration: underline; color: #000000;}a:active { text-decoration: none; color: #000000;}--></style></head><body><?phpfunction getpage($showpage) { switch ($showpage) { case "home": $sql = "SELECT * FROM `news` order by `id` DESC LIMIT 0,4"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_assoc($result)) { $title = $row['title']; $author = $row['author']; $date = $row['date']; $content = $row['content']; $img = $row['img']; $id = $row['id']; echo " <table> <tr> <td width='534'>$img</td></tr></table> <table> <tr> <td width='395'>$title</td> <td width='135'>$author Date: $date</td> </tr> </table> <table> <tr> <td width='534'>$content</td> </tr> </table> ";} break; case "achieves": $sql = "SELECT * FROM `news` order by `id`"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_assoc($result)) { $title = $row['title']; $author = $row['author']; $date = $row['date']; $id = $row['id']; echo " <center> <table width='534'> <tr> <td>$title</td> <td>$author</td> <td>$date</td> </tr> </table></center> ";} break; case "forum": // print 'The forums section is currently under development please check back later.'; break; // <<<----- Still getting error here case "roster": break; case "matches": $sql = "SELECT * FROM `matches` order by `id`"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_assoc($result)) { $opponent = $row['opponent']; $description = $row['description']; $date = $row['date']; $score_one = $row['score_one']; $score_one = $row['score_one']; $id = $row['id']; echo " <center> <table width='534' bgcolor='#000000'> <tr> <td bgcolor='#000000'><font color='#FFFFFF'> $id </font></td> <td bgcolor='#000000'><font color='#FFFFFF'> $opponent </font></td> <td bgcolor='#000000'><font color='#FFFFFF'> $description </font></td> <td bgcolor='#000000'><font color='#FFFFFF'> $date </font></td> <td bgcolor='#000000'><font color='#00FF00'> $score_one </font><font color='#FFFFFF'> - </font><font color='#FF0000'> $score_two </font></td> </tr> </table></center> "; } break; case "media": $sql = "SELECT * FROM `media` order by `id`"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_assoc($result)) { $title = $row['title']; $description = $row['description']; $date = $row['date']; $id = $row['id']; echo " <center> <table width='534' bgcolor='#000000'> <tr> <td bgcolor='#000000'><font color='#FFFFFF'> $id </font></td> <td bgcolor='#000000'><font color='#FFFFFF'> $title </font></td> <td bgcolor='#000000'><font color='#FFFFFF'> $description </font></td> <td bgcolor='#000000'><font color='#FFFFFF'> $date </font></td> </tr> </table></center> "; } break; case "proshop": $sql = "SELECT * FROM `proshop` order by `id`"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_assoc($result)) { $img = $row['img']; $title = $row['name']; $manufacturer = $row['manufacturer']; $description = $row['description']; $price = $row['price']; $id = $row['id']; echo " <center> <table width='534' bgcolor='#000000'> <tr> <td bgcolor='#000000'><font color='#FFFFFF'> $img </font></td> <td bgcolor='#000000'><font color='#FFFFFF'> $name </font></td> <td bgcolor='#000000'><font color='#FFFFFF'> $manufacturer </font></td> <td bgcolor='#000000'><font color='#FFFFFF'> $description </font></td> <td bgcolor='#000000'><font color='#FFFFFF'> $price </font></td> </tr> </table></center> "; } break; case "lessons": echo "<center><table width='534' bgcolor='#CCCCCC'><tr><td></td><td bgcolor='#CCCCCC'><font id=text/>Game</td><td bgcolor='#CCCCCC'><font id=text/>Teacher</td><td bgcolor='#CCCCCC'><font id=text/>Price Per Hour</td></tr>"; $sql = "SELECT * FROM `lessons` order by `id`"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_assoc($result)) { $img = $row['img']; $game = $row['game']; $teacher = $row['teacher']; $price = $row['price']; $id = $row['id']; echo " <tr> <td bgcolor='#CCCCCC'><font id=text/> $img </td> <td bgcolor='#CCCCCC'><font id=text/> $game </td> <td bgcolor='#CCCCCC'><font id=text/> $teacher </td> <td bgcolor='#CCCCCC'><font id=text/> $price </td> <td bgcolor='#CCCCCC'><font id=text/><a href='order.php?page=lessons'>Order</a></td> "; } echo <<<BLOCK </table></center> BLOCK; break; case "demos": echo " <table bgcolor='#CCCCCC'><tr> <td bgcolor='#CCCCCC'><font id=text/>Title</td> <td bgcolor='#CCCCCC'><font id=text/>Description</td> <td bgcolor='#CCCCCC'><font id=text/>Length</td> <td bgcolor='#CCCCCC'><font id=text/>Size</td> <td bgcolor='#CCCCCC'><font id=text/>Download</td> </tr>"; $sql = "SELECT * FROM `demos` order by `id`"; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_assoc($result)) { $title = $row['title']; $description = $row['description']; $length = $row['length']; $size = $row['size']; $id = $row['id']; echo " <table><tr> <td bgcolor='#CCCCCC'><font id=text/> $title </td> <td bgcolor='#CCCCCC'><font id=text/> $decription </td> <td bgcolor='#CCCCCC'><font id=text/> $length </td> <td bgcolor='#CCCCCC'><font id=text/> $size </td> <td bgcolor='#CCCCCC'><font id=text/><a href='download.php?get=$id'>Download</td> </tr></table>";} break; case "gallery": break; case "sponsors": echo ''; break; case "aboutus": echo " <table width='535'><font id='text' />n2p is a gaming organization established in 1999. Over time we have become one of the most respected organizations in the gaming community. We have big plans ahead and are always looking for those who support us to continue to support us.</table> "; break; }}getpage($_GET['page']);?></body></html>[/code] Quote Link to comment Share on other sites More sharing options...
cameeob2003 Posted July 19, 2006 Author Share Posted July 19, 2006 Im still getting the same errors could this be due to a serverside confliction? Quote Link to comment Share on other sites More sharing options...
redarrow Posted July 19, 2006 Share Posted July 19, 2006 post the exact block thats conflcting ok i test it here ok. 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.