Witam. Mam problem z przesyłaniem danych w formularzu metodą POST. Posiadam dwie strony: index.php i index2.php. Na index.php jest forumlarz, który wysyła dane metodą POST do strony index2.php. Wszystko do tego momentu jest w porządku, ale gdy wysyłam inne dane z formularza na stronie index2.php. Wyskakuje błąd: Undefined index: login. Podaje cały kod:
index.php
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Test</title>
</head>
<body>
<form action="index2.php" method="post">
<input type="text" name="login">
<input type="submit" name="wyslij" value="Wyślij">
</form>
</body>
</html>
index2.php
<?php
echo $_POST["login"];
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Test2</title>
</head>
<body>
<form method="post">
<input type="text" name="login2">
<input type="submit" name="wyslij2" value="Wyślij">
</form>
</body>
</html>