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
https://forums.phpfreaks.com/topic/195636-correct-code/
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
https://forums.phpfreaks.com/topic/195636-correct-code/#findComment-1027920
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
https://forums.phpfreaks.com/topic/195636-correct-code/#findComment-1028339
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.