&gt;_docheckuser($userID,$sessionID) == false)
    {
      return 'User invalid';
    }

    $data_encrypted = md5($sessionID);

    if ($data_encrypted != $encrypted) return 'encryption error';

    // UPDATE ou INSERT ? User a t-il deja joue ?
    $sql2 = 'SELECT score FROM user_rktn WHERE id_auteur='.$userID.'';
    $req2 = mysql_query($sql2) or die('Erreur SQL !&lt;br /&gt;'.$sql2.'&lt;br /&gt;'.mysql_error());
    $data2 = mysql_fetch_array($req2);

    if ($data2[0] != '') {
      // update
      $sql