Is it possible to have a HTML SELECT/OPTION value as NULL using PHP?

PHPServer Side ProgrammingProgramming

The short answer is no. POST/GET values are never null. The best they can be is an empty string, which can then be converted to null/'NULL' −

Example

 Live Demo

if ($_POST['value'] === '') {
   $_POST['value'] = null;
}
echo'Null assigned';

Output

This will produce the following output −

Null assigned
raja
Published on 07-Apr-2020 13:10:32
Advertisements