I have a problem with the following statement:

$dbres				= mysql_query("SELECT UNIX_TIMESTAMP(`huur`) AS `huur`,huur1,`login`,UNIX_TIMESTAMP(`signup`) AS `signup`,`attack`,`defence`,`clicks`,`attlosses`,`attwins`,`deflosses`,`defwins`,`cash`,`type`,`clan`,'maffiamode',`avaurl` FROM `[users]` WHERE `login`='{$_GET['x']}'");
    if($def = mysql_fetch_object($dbres)) {
      if($def->login == $data->login){
	    print "  <tr><td class=\"mainTxt\">You kicked yourself in the nuts... now what?.</td></tr>\n";
      }else if($def->login == $admin1)
        print "  <tr><td class=\"mainTxt\">Do NOT attack an admin!</td></tr>\n";
else if($def->maffiamode == 1)
        print "  <tr><td class=\"mainTxt\">This pirate is currently under Davy Jones' protection!!</td></tr>\n";}
      else {

Even when $def->maffiamode == 1
really is set to 1 in the database

it still doesn't display the message...

The first 2 statements (

if($def->login == $data->login){


}else if($def->login == $admin1)

work without a problem

need any further info?
(I attached the file so you can see for yourself)

You don't have a closing bracket before the else if on line 7. This doesn't result in an error in the interpreter but I think it is causing it to skip over the else if and go directly to the else on line 9 every time the initial if isn't satisfied.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.