i have a database and want to check if the elements are set or not before they pass to database because i dont want to pass null values for entities mentioned but while using this statement i find out values are passing without being check for availability.
i tried to pass those elements to the database but check for nulls first and they were not checked for nulls and sometimes got this error as well:
Fatal error: Cannot use isset() on the result of an expression (you
can use "null !== expression" instead) in C:xampphtdocs….on line
3
2
Answers
The isset function works differently, you need to put a variable into it, not a condition.
For example:
this page detailed
Let’s try writing the following to fix the error in your code.
or
If you want to prevent
null
values from being inserted into the DB:also, use the required attribute in your html document: