Загрузка...

How to check if a form has been submitted in PHP

PHP for Beginners course: ➤ https://davehollingworth.net/phpy
PHP MVC course: ► https://davehollingworth.net/phpmvcy

If you have a short PHP script that contains a form, and you want to process that form in the same script, then you need to detect whether the form has been submitted or not.

In this video we'll look at how NOT to do it (even though there's lots of code out there that does it the wrong way) and the recommended way.

Code shown in the video:
https://gist.github.com/daveh/ff121a0bfcfeebcde82081cd2f32e935

Documentation shown in the video:
PHP $_POST:
https://www.php.net/manual/en/reserved.variables.post.php

PHP $_SERVER:
https://www.php.net/manual/en/reserved.variables.server.php

Видео How to check if a form has been submitted in PHP канала Dave Hollingworth
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять