KaineBennett Posted February 17, 2014 Posted February 17, 2014 I need help with this code as it keeps giving me this error.... Parse error: syntax error, unexpected $end in /home/*******/*******/index_new.php on line 383 <?php session_start(); include "other/db_connect.php"; if ($_GET['action'] == "logout"){ session_destroy(); die('You have been logged out.<meta http-equiv="refresh" content="5;url=index.php">'); ?> <head> <title>Crime City - A Mafia Based MMORPG</title> <script type='text/javascript' src='js/jquery-1.4.2.min.js'></script> <script type="text/javascript" src="js/jquery.tipsy.js"></script> <link rel="stylesheet" href="js/tipsy.css" type="text/css" /> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script> <script>!window.jQuery && document.write(unescape('%3Cscript src="jquery/jquery-1.7.2.min.js"%3E%3C/script%3E'))</script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> <script>!window.jQuery.ui && document.write(unescape('%3Cscript src="jquery/jquery-ui-1.8.21.custom.min.js"%3E%3C/script%3E'))</script> <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js'></script> <script type='text/javascript' src='jquery.tipsy.js'></script> <script type='text/javascript'> $(function() { $('#tipsy').tipsy({fade: true, gravity: 'n'}); }); $(function() { $('#tipsy1').tipsy({fade: true, gravity: 'n'}); }); $(function() { $('#tipsy2').tipsy({fade: true, gravity: 'n'}); }); $(function() { $('#tipsy3').tipsy({fade: true, gravity: 'n'}); }); $(function() { $('#tipsy4').tipsy({fade: true, gravity: 'n'}); }); $(function() { $('#tipsy5').tipsy({fade: true, gravity: 'n'}); }); $(function() { $('#tipsy6').tipsy({fade: true, gravity: 'n'}); }); $(function() { $('#tipsy7').tipsy({fade: true, gravity: 'n'}); }); $(function() { $('#tipsy8').tipsy({fade: true, gravity: 'n'}); }); $(function() { $('#tipsy9').tipsy({fade: true, gravity: 'n'}); }); $(function() { $('#tipsy10').tipsy({fade: true, gravity: 'n'}); }); $(function() { $('#tipsy11').tipsy({fade: true, gravity: 'n'}); }); </script> <style type="text/css"> @import url(http://fonts.googleapis.com/css?family=Fjalla+One); @import url(http://fonts.googleapis.com/css?family=Akronim); body { background-image: url(http://allgamewallpapers.com/wallpapers/full/race-pictures-need-for-speed-c-51854.jpg); overflow-x: hidden; background-color: transparent; background-attachment:fixed; border: 0px; } #container { width:1000px; margin:100px auto; } #content { float:left; width:820px; padding: 150px auto; text-align:center; border: 1px solid #111111; height:500px; background:#232323; font-family: 'Fjalla One', sans-serif; font-size:14px; color:#666666; border-top-right-radius: 8px; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; } #sidebar { float:left; width:160px; border-top-left-radius: 8px; border-bottom-left-radius: 8px; text-align:center; border: 1px solid #111111; height:400px; background:#232323; } .bottom_head { position: fixed; bottom: 0; right: 280px; background-attachment:fixed; border-top-left-radius: 8px; border-top-right-radius: 8px; background-color: #000; background-image: url('http://caviar.dtmcdn.com/static/images/button.png'); background-repeat:no-repeat; border: 1px solid #333; border-bottom: 0; padding: 5px; font-size: 14px; font-family: 'Fjalla One', sans-serif; color: #ccc; width: 750px; text-align: center; opacity: 0.75; } .top_stats_icons { position: fixed; top: 58px; border-top-left-radius: 8px; border-top-right-radius: 8px; background-color: #000; background-image: url('http://caviar.dtmcdn.com/static/images/button.png'); background-repeat: repeat-x; border: 1px solid #000; border-bottom: 0; padding: 6px; font-size: 13px; font-family: 'Fjalla One', sans-serif; color: #ccc; width: 600px; text-align: center; opacity: 0.75; } .logo_head { position: fixed; top: 0; right: 317px; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; background-color: #000; background-image: url('http://caviar.dtmcdn.com/static/images/button.png'); background-repeat: repeat-x; border: 1px solid #000; border-bottom: 0; padding: 6px; font-size: 13px; font-family: 'Fjalla One', sans-serif; color: #ccc; width: 600px; text-align: center; opacity: 0.75; } .img:hover { opacity: 0.40; background-image: url('http://caviar.dtmcdn.com/static/images/button.png'); } .bottom_header { position: fixed; bottom: 80; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; background-color: #000; background-image: url('http://caviar.dtmcdn.com/static/images/button.png'); background-repeat: repeat-x; border: 1px solid #000; border-top: 0; padding: 6px; font-size: 11px; font-family: 'Fjalla One', sans-serif; color: #ccc; width: 135px; text-align: center; opacity: 0.75; } .logout { position: fixed; top: 0; right: 280px; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; background-color: #000; background-image: url('http://caviar.dtmcdn.com/static/images/button.png'); background-repeat: repeat-x; border: 2px solid #333; border-top: 0; padding: 6px; font-size: 13px; font-family: 'Fjalla One', sans-serif; color: #ccc; width: 70px; text-align: center; opacity: 0.75; } .search { position: fixed; top: 0; right: 380px; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; background-color: #000; background-image: url('http://caviar.dtmcdn.com/static/images/button.png'); background-repeat: repeat-x; border: 2px solid #333; border-top: 0; padding: 6px; font-size: 13px; font-family: 'Fjalla One', sans-serif; color: #ccc; width: 180px; text-align: center; opacity: 0.75; } .search_box { font-family: 'Fjalla One', sans-serif; color: #ccc; background: #222; width: 130px; border: 1px solid #333; } .search_button { font-family: 'Fjalla One', sans-serif; color: #ccc; background: #222; width: 35px; border: 1px solid #333; } h1 { font-family: 'Fjalla One', sans-serif; font-size:18px; color:#666; font-weight:bold; } .fix { left: 250px; } .pos { left: 320px;} .pos1 { left: 470px; } .pos2 { left: 620px; } .pos3 { left: 770px; } .pos4 { right: 20px; } .pos5 { left: 20px; } .pos8 { left: 350px; } .pos6 { left: 920px; } .pos7 { left: 940px; } .tipsy { width:150px; font-size: 11px; opacity: 0.8; filter: alpha(opacity=80); } .tipsy-inner { padding: 5px; background-color: #111111; color: white; } .tipsy-inner { -moz-border-radius:5px; -webkit-border-radius:5px; } .tipsy-north { background-position: top center; } .tipsy-south { background-position: bottom center; } .tipsy-east { background-position: right center; } .tipsy-west { background-position: left center; } .tipsy-container { border: 1px solid green;} </style> </HEAD> <BODY> <div id="container"> <div class="logo logo_head"><img src=images/top.png height="32"></div> <div class="search pos5"><input id='q' name='q' class='search_box' onblur='if(this.value=='')this.value=this.defaultValue;' onfocus='if(this.value==this.defaultValue)this.value='';' type='text' value='Search Gangsters..'/> <input name="search" type="submit" align="right" class="search_button" id="search" value="Go!"></div> <div class="top_stats_icons pos8"> <img src=stats_icons/travel.png class="img" id="tipsy" title="Travel the world"> <img src=stats_icons/bank.png class="img" id="tipsy1" title="Visit the bank"> <img src=stats_icons/credits.png class="img" id="tipsy2" title="Purchase credits"> <img src=stats_icons/settings.png class="img" id="tipsy3" title="Edit profile"> <img src=stats_icons/support.png class="img" id="tipsy4" title="Visit support"> <img src=stats_icons/gta.png class="img" id="tipsy5" title="Commit a gta"> <img src=stats_icons/mug.png class="img" id="tipsy11" title="Commit a crime"> <img src=stats_icons/info.png class="img" id="tipsy6" title="Get some info"> <img src=stats_icons/helpdesk.png class="img" id="tipsy7" title="Get some help"> <img src=stats_icons/jail.png class="img" id="tipsy8" title="Visit the local jail"> <img src=stats_icons/kill.png class="img" id="tipsy9" title="Kill a gangster"> <img src=stats_icons/shop.png class="img" id="tipsy10" title="Go shopping"> </div> <div class="logout pos4"><a href=?action=logout>Exit</a></div> <div id="sidebar"> <iframe src="menu.php" name="menu" scrolling="no" width="150" style="border:0px;overflow:hidden;" height="400" id="menu" title="menu" /></iframe> </div> <div id="content"> <iframe src="news.php" name="mainFrame" scrolling="auto" width="810" style="border:0px;" height="500" id="mainFrame" title="mainFrame" /></iframe> </div> <div class="bottom_header pos">Name: <?php echo"$user";?></div> <div class="bottom_header pos1">Rank: <?php echo"$fetch->rank";?> (<?php echo"$rank";?>)</div> <div class="bottom_header pos2">Money: <?php echo"$".makecomma($fetch->money)."";?></div> <div class="bottom_header pos6">Loc: <?php echo"$fetch->ccountry";?></div> </div> <p style="margin:0; font-size:11px; position: fixed; bottom: 2px; left: 2px;" scrolling="no">Crime City © 2014+</p> <p style="margin:0; font-size:11px; position: fixed; bottom: 2px; right: 2px;" scrolling="no"><img src=images/gangster.png></p> </body> Quote
lucky3809 Posted February 17, 2014 Posted February 17, 2014 You started with an IF statement, but did not close it This is the error: <?php session_start(); include "other/db_connect.php"; if ($_GET['action'] == "logout"){ session_destroy(); die('You have been logged out.<meta http-equiv="refresh" content="5;url=index.php">'); ?> And guessing I would say this is the fix: <?php session_start(); include "other/db_connect.php"; if ($_GET['action'] == "logout"){ session_destroy(); die('You have been logged out.<meta http-equiv="refresh" content="5;url=index.php">'); } ?> Quote
jcvenom Posted February 17, 2014 Posted February 17, 2014 try this <?php /*The error here was you were missing } in your code thats why you where given an error "Parse error: syntax error, unexpected $end" */ session_start(); include "other/db_connect.php"; if ($_GET['action'] == "logout"){ session_destroy(); die('You have been logged out.<meta http-equiv="refresh" content="5;url=index.php">'); } ?> <head> <title>Crime City - A Mafia Based MMORPG</title> <script type='text/javascript' src='js/jquery-1.4.2.min.js'></script> <script type="text/javascript" src="js/jquery.tipsy.js"></script> <link rel="stylesheet" href="js/tipsy.css" type="text/css" /> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script> <script>!window.jQuery && document.write(unescape('%3Cscript src="jquery/jquery-1.7.2.min.js"%3E%3C/script%3E'))</script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> <script>!window.jQuery.ui && document.write(unescape('%3Cscript src="jquery/jquery-ui-1.8.21.custom.min.js"%3E%3C/script%3E'))</script> <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js'></script> <script type='text/javascript' src='jquery.tipsy.js'></script> <script type='text/javascript'> $(function() { $('#tipsy').tipsy({fade: true, gravity: 'n'}); }); $(function() { $('#tipsy1').tipsy({fade: true, gravity: 'n'}); }); $(function() { $('#tipsy2').tipsy({fade: true, gravity: 'n'}); }); $(function() { $('#tipsy3').tipsy({fade: true, gravity: 'n'}); }); $(function() { $('#tipsy4').tipsy({fade: true, gravity: 'n'}); }); $(function() { $('#tipsy5').tipsy({fade: true, gravity: 'n'}); }); $(function() { $('#tipsy6').tipsy({fade: true, gravity: 'n'}); }); $(function() { $('#tipsy7').tipsy({fade: true, gravity: 'n'}); }); $(function() { $('#tipsy8').tipsy({fade: true, gravity: 'n'}); }); $(function() { $('#tipsy9').tipsy({fade: true, gravity: 'n'}); }); $(function() { $('#tipsy10').tipsy({fade: true, gravity: 'n'}); }); $(function() { $('#tipsy11').tipsy({fade: true, gravity: 'n'}); }); </script> <style type="text/css"> @import url(http://fonts.googleapis.com/css?family=Fjalla+One); @import url(http://fonts.googleapis.com/css?family=Akronim); body { background-image: url(http://allgamewallpapers.com/wallpapers/full/race-pictures-need-for-speed-c-51854.jpg); overflow-x: hidden; background-color: transparent; background-attachment:fixed; border: 0px; } #container { width:1000px; margin:100px auto; } #content { float:left; width:820px; padding: 150px auto; text-align:center; border: 1px solid #111111; height:500px; background:#232323; font-family: 'Fjalla One', sans-serif; font-size:14px; color:#666666; border-top-right-radius: 8px; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; } #sidebar { float:left; width:160px; border-top-left-radius: 8px; border-bottom-left-radius: 8px; text-align:center; border: 1px solid #111111; height:400px; background:#232323; } .bottom_head { position: fixed; bottom: 0; right: 280px; background-attachment:fixed; border-top-left-radius: 8px; border-top-right-radius: 8px; background-color: #000; background-image: url('http://caviar.dtmcdn.com/static/images/button.png'); background-repeat:no-repeat; border: 1px solid #333; border-bottom: 0; padding: 5px; font-size: 14px; font-family: 'Fjalla One', sans-serif; color: #ccc; width: 750px; text-align: center; opacity: 0.75; } .top_stats_icons { position: fixed; top: 58px; border-top-left-radius: 8px; border-top-right-radius: 8px; background-color: #000; background-image: url('http://caviar.dtmcdn.com/static/images/button.png'); background-repeat: repeat-x; border: 1px solid #000; border-bottom: 0; padding: 6px; font-size: 13px; font-family: 'Fjalla One', sans-serif; color: #ccc; width: 600px; text-align: center; opacity: 0.75; } .logo_head { position: fixed; top: 0; right: 317px; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; background-color: #000; background-image: url('http://caviar.dtmcdn.com/static/images/button.png'); background-repeat: repeat-x; border: 1px solid #000; border-bottom: 0; padding: 6px; font-size: 13px; font-family: 'Fjalla One', sans-serif; color: #ccc; width: 600px; text-align: center; opacity: 0.75; } .img:hover { opacity: 0.40; background-image: url('http://caviar.dtmcdn.com/static/images/button.png'); } .bottom_header { position: fixed; bottom: 80; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; background-color: #000; background-image: url('http://caviar.dtmcdn.com/static/images/button.png'); background-repeat: repeat-x; border: 1px solid #000; border-top: 0; padding: 6px; font-size: 11px; font-family: 'Fjalla One', sans-serif; color: #ccc; width: 135px; text-align: center; opacity: 0.75; } .logout { position: fixed; top: 0; right: 280px; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; background-color: #000; background-image: url('http://caviar.dtmcdn.com/static/images/button.png'); background-repeat: repeat-x; border: 2px solid #333; border-top: 0; padding: 6px; font-size: 13px; font-family: 'Fjalla One', sans-serif; color: #ccc; width: 70px; text-align: center; opacity: 0.75; } .search { position: fixed; top: 0; right: 380px; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; background-color: #000; background-image: url('http://caviar.dtmcdn.com/static/images/button.png'); background-repeat: repeat-x; border: 2px solid #333; border-top: 0; padding: 6px; font-size: 13px; font-family: 'Fjalla One', sans-serif; color: #ccc; width: 180px; text-align: center; opacity: 0.75; } .search_box { font-family: 'Fjalla One', sans-serif; color: #ccc; background: #222; width: 130px; border: 1px solid #333; } .search_button { font-family: 'Fjalla One', sans-serif; color: #ccc; background: #222; width: 35px; border: 1px solid #333; } h1 { font-family: 'Fjalla One', sans-serif; font-size:18px; color:#666; font-weight:bold; } .fix { left: 250px; } .pos { left: 320px;} .pos1 { left: 470px; } .pos2 { left: 620px; } .pos3 { left: 770px; } .pos4 { right: 20px; } .pos5 { left: 20px; } .pos8 { left: 350px; } .pos6 { left: 920px; } .pos7 { left: 940px; } .tipsy { width:150px; font-size: 11px; opacity: 0.8; filter: alpha(opacity=80); } .tipsy-inner { padding: 5px; background-color: #111111; color: white; } .tipsy-inner { -moz-border-radius:5px; -webkit-border-radius:5px; } .tipsy-north { background-position: top center; } .tipsy-south { background-position: bottom center; } .tipsy-east { background-position: right center; } .tipsy-west { background-position: left center; } .tipsy-container { border: 1px solid green;} </style> </HEAD> <BODY> <div id="container"> <div class="logo logo_head"><img src=images/top.png height="32"></div> <div class="search pos5"><input id='q' name='q' class='search_box' onblur='if(this.value==''<img src="images/smilies/wink.png" border="0" alt="" title="Wink" class="inlineimg" />this.value=this.defaultValue;' onfocus='if(this.value==this.defaultValue)this.val ue='';' type='text' value='Search Gangsters..'/> <input name="search" type="submit" align="right" class="search_button" id="search" value="Go!"></div> <div class="top_stats_icons pos8"> <img src=stats_icons/travel.png class="img" id="tipsy" title="Travel the world"> <img src=stats_icons/bank.png class="img" id="tipsy1" title="Visit the bank"> <img src=stats_icons/credits.png class="img" id="tipsy2" title="Purchase credits"> <img src=stats_icons/settings.png class="img" id="tipsy3" title="Edit profile"> <img src=stats_icons/support.png class="img" id="tipsy4" title="Visit support"> <img src=stats_icons/gta.png class="img" id="tipsy5" title="Commit a gta"> <img src=stats_icons/mug.png class="img" id="tipsy11" title="Commit a crime"> <img src=stats_icons/info.png class="img" id="tipsy6" title="Get some info"> <img src=stats_icons/helpdesk.png class="img" id="tipsy7" title="Get some help"> <img src=stats_icons/jail.png class="img" id="tipsy8" title="Visit the local jail"> <img src=stats_icons/kill.png class="img" id="tipsy9" title="Kill a gangster"> <img src=stats_icons/shop.png class="img" id="tipsy10" title="Go shopping"> </div> <div class="logout pos4"><a href=?action=logout>Exit</a></div> <div id="sidebar"> <iframe src="menu.php" name="menu" scrolling="no" width="150" style="border:0px;overflow:hidden;" height="400" id="menu" title="menu" /></iframe> </div> <div id="content"> <iframe src="news.php" name="mainFrame" scrolling="auto" width="810" style="border:0px;" height="500" id="mainFrame" title="mainFrame" /></iframe> </div> <div class="bottom_header pos">Name: <?php echo"$user";?></div> <div class="bottom_header pos1">Rank: <?php echo"$fetch->rank";?> (<?php echo"$rank";?>)</div> <div class="bottom_header pos2">Money: <?php echo"$".makecomma($fetch->money)."";?></div> <div class="bottom_header pos6">Loc: <?php echo"$fetch->ccountry";?></div> </div> <p style="margin:0; font-size:11px; position: fixed; bottom: 2px; left: 2px;" scrolling="no">Crime City © 2014+</p> <p style="margin:0; font-size:11px; position: fixed; bottom: 2px; right: 2px;" scrolling="no"><img src=images/gangster.png></p> </body> Quote
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.