fxGetRow($sqlkey_chain); if (!$infoCompte==null){ $mem_count=$infoCompte['key_chain_count']+1; $update_plus=""; if ($infoCompte['key_chain_com_id']==0 && isset($_SESSION['com_id'])){ $update_plus="key_chain_com_id=".$_SESSION['com_id'].",";} $sqlUpdate = "UPDATE key_chain SET ".$update_plus."key_chain_adress_ip='". $_SERVER['REMOTE_ADDR'] ."',key_chain_count = ".$mem_count." WHERE pk_key_chain = " . $key_chain_id ; $qryUpdate = $objDatabase->fxQuery($sqlUpdate); header("Location: ".$infoCompte['key_chain_http']); }else{ if (isset($_SESSION['com_id'])){ $mem_com_id=$_SESSION['com_id']; }else{ $mem_com_id=0; } $sqlUpdate = "insert key_chain SET key_chain_com_id=".$mem_com_id.",key_chain_timestamp=now(),key_chain_http='".$defaut_landingpage."',key_chain_adress_ip='". $_SERVER['REMOTE_ADDR'] ."',key_chain_count = 1,pk_key_chain=" . $key_chain_id; $qryUpdate = $objDatabase->fxQuery($sqlUpdate); header("Location: $defaut_landingpage" ); } exit;