Hi all,

the following script will not increment (2nd level), but updates fine at level 1 (COMPLETED POSITIVE).

can anybody see why?

regards

if ($_REQUEST['16emp'] == 'Yes'){
      
      $flag = $_REQUEST['flag'];
      
      $flag2 = 'COMPLETED POSITIVE';
      
      mysql_query("UPDATE accounts SET `flag` = '$flag2' WHERE `client_id`='$clientid'") or die(mysql_error());
      
      } else if ($_REQUEST['16emp'] == 'No') {
      
      $flag2 = $_REQUEST['flag'] + 1;
    
    mysql_query("UPDATE accounts SET `flag` = '$flag2' WHERE `client_id`='$clientid'") or die(mysql_error());
      }

What is the value of $_REQUEST ?
And what is the value of $flag2 supposed to? in the first if statement its a string (COMPLETED POSITIVE)

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.