I'm trying to redirect, but it doesn't include all the parameters in the url
if (!empty($_POST['nazwauzytkownika']) && $_POST['haslo'])
$redirect = $_GET['redirect'];
$redirect = 'http://*****.pl/konto/?a=powitanie';
it is not redirect problem but url problem
every GET parameter should be urlencoded
$redirect = rawurlencode($redirect); ?> <a href="some.php?redirect=<?=$redirect?>">
then you will have your redirect param inact and can use it for redirect.
though it's considered as bad practice as your script can be used for phishing links.
it's better to pass just url identifier, and then read an url itself from db/session/whatever server side storage