PHP Isset() and Empty()

434

Empty()

Returns False if empty() has non-empty and non-zero value.

Returns True for Null, 0, “”

 

Isset()

Returns False for Null

Returns True for 0, “” or any value

 

Both Textareas and Texboxes will sent “” values and not Null to the $_POST[], so use Emtpty() instead of Isset()

On the other hand, for radio button or combobox with 0 value, use Isset()

Ref: http://www.htmlcenter.com/blog/empty-and-isset-in-php/

·


Related Articles & Comments

Thank you for visiting us. To continue receiving updates, please Subscribe to our Social Media Channels.

Google+
FACEBOOK
RSS
YOUTUBE
Menu Title
%d bloggers like this: