adamjones Posted May 11, 2010 Share Posted May 11, 2010 Hi. Having a problem with this script, and I can't see any errors in it... seem to have all my semi-colons, brackets and speech marks :S <?php session_start(); require_once('config.php'); $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); if(!$link) { die('Failed to connect to server: ' . mysql_error()); } $db = mysql_select_db(DB_DATABASE); if(!$db) { die("Unable to select database"); } function clean($str) { $str = @trim($str); if(get_magic_quotes_gpc()) { $str = stripslashes($str); } return mysql_real_escape_string($str); } $qry="SELECT * FROM fuse_rights WHERE username='".$_SESSION['username']."'"; $result=mysql_query($qry); if($result) { if(mysql_num_rows($result) == 1) { $checks = mysql_fetch_assoc($result); $hk = $checks['housekeeping']; $comp = $checks['competitions']; $news = $checks['news']; $events = $checks['events']; $twitter = $checks['twitter']; $forum = $checks['forum_admin']; $pages = $checks['pages']; $users = $checks['users']; $settings = $checks['settings']; $bans = $checks['bans']; } } if(isset($_SESSION['username']) && $hk == 0) { $errflag = true; $errmsg_arr[] = 'You do not have access to the Intra.'; if($errflag) { $_SESSION['ERRMSG_ARR'] = $errmsg_arr; session_write_close(); header("location: ./error"); } } if(isset($_SESSION['username']) && $users == 0) { header("location: ./dash"); } $uname=$_GET['uname']; $badge=$_GET['badge']; $sql="DELETE FROM badges WHERE username='$uname' AND badge='$badge'"; $result=mysql_query($sql); if($result){ $errflag = true; $errmsg_arr[] = '<div id="message-success" class="message message-success"> <div class="image"> <img src="resources/images/icons/success.png" alt="Success" height="32" /> </div> <div class="text"> <h6>Success</h6> <span>Badge removed.</span> </div> <div class="dismiss"> <a href="#message-success"></a> </div> </div>'; if($errflag) { $_SESSION['ERRMSG_ARR5'] = $errmsg_arr; session_write_close(); header("location: ./edit_user?username=".$uname"#box-badges"); } } ?> Error is; "Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/habhubc/public_html/intra/update_remove_badge.php on line 80" Thanks! Quote Link to comment Share on other sites More sharing options...
Mchl Posted May 11, 2010 Share Posted May 11, 2010 Linbe 80 header("location: ./edit_user?username=$uname#box-badges"); Quote Link to comment Share on other sites More sharing options...
adamjones Posted May 11, 2010 Author Share Posted May 11, 2010 Thanks - Linbe 80 header("location: ./edit_user?username=$uname#box-badges"); Why didn't I think of that.. 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.