Jump to content

Fatal error with empty()


leke

Recommended Posts

Trying to validate a form for empty input using empty() but when I introduced it to my code, I get the error...

Fatal error: Call to undefined function  empty() in /srv/disk1/940225/www/domain.co.cc/contact_db/sanitize.php on line 13

Here is where I introduced it...

$message = $_POST['message']; 

if( !isset($message) || empty($message) ) {
...

What am I doing wrong here?

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/254868-fatal-error-with-empty/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.