$has = "SELECT * FROM has"; { if($ser['id'] == $haslo['idser']) { $is = "UPDATE has SET haslo='$_POST[haslo]' WHERE idser='$ser[id]'"; } else { $in = "INSERT INTO has VALUES ('$ser[id]', '$_POST[haslo]')"; } }
i chce w nim aby gdy w $haslo[idser] jest id serwera to robi update a jeżeli go nie ma to robi insert. i jeżeli mam wogule coś w tabeli to robi insert gdy jest juz w tabeli to robi insert i update jednoczesnie