Jump to content

Correct code?


karimali831

Recommended Posts

}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.

Link to comment
Share on other sites

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.

 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.