Первый файл index.php:
PHP:
скопировать код в буфер обмена
скопировать код в буфер обмена
- <?PHP
- echo 'Твое имя: ' . $_COOKIE['name'] . ', твоя фамилия: ' . $_COOKIE['second_name'];
- }
- ?>
- <form action="cookie.php" method="POST">
- <p>Имя<input type="text" name="name"></p>
- <p>Фамилия<input type="text" name="second_name"></p>
- <button type="submit">Отправить</button>
- </form>