karimali831 Posted March 18, 2010 Share Posted March 18, 2010 }elseif(isset($_GET['action']) && $_GET['action'] == 'leadmember') { if(mysql_num_rows(safe_query("SELECT ID FROM ".PREFIX."cup_all_clans WHERE leader = '".$userID."' AND ID = '".$clanID."'"))){ safe_query("UPDATE FROM ".PREFIX."cup_clan_members SET function = 'Leader' WHERE userID = '".$_GET['memberID']."' && clanID = '".$_GET['clanID']."'"); redirect('clans&action=clanedit&clanID='.$_GET['clanID'], $_language->module['member_edited'], 2); } When I try and set function for userID, page breaks. (no errors) clans&action=leadmember&clanID=325&memberID=325 The IDs are correct.. any ideas what's wrong? Thanks for any help. Quote Link to comment Share on other sites More sharing options...
trq Posted March 18, 2010 Share Posted March 18, 2010 page breaks. (no errors) Have you got error reporting and display errors enabled? Are you checking your query succeeds within safe_query()? Quote Link to comment Share on other sites More sharing options...
karimali831 Posted March 18, 2010 Author Share Posted March 18, 2010 Query does not succeed and I'm not sure how to enable display errors? Thanks for help Quote Link to comment Share on other sites More sharing options...
trq Posted March 18, 2010 Share Posted March 18, 2010 This should be at the top of all script while developing, or better still, set these values in your php.ini. <?php error_reporting(E_ALL); ini_set('display_errors', 1); ?> If the query isn't succeeding, why are you passing its results to mysql_num_rows() ? We need to see this safe_query() function. Quote Link to comment Share on other sites More sharing options...
karimali831 Posted March 18, 2010 Author Share Posted March 18, 2010 Nice! I get the error now Notice: Undefined variable: members in /home/ficomedi/public_html/cup/languages/uk/clans.php on line 89 Notice: Undefined variable: ds in /home/ficomedi/public_html/cup/languages/uk/clans.php on line 89 Notice: Undefined variable: clanID in /home/ficomedi/public_html/cup/clans.php on line 340 I'm going through these errors now. Quote Link to comment Share on other sites More sharing options...
karimali831 Posted March 18, 2010 Author Share Posted March 18, 2010 OMG thank you soo much! 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.