Form field input empty than do not update
I have a form that updates a user's info. How can I开发者_开发百科 tell the form to NOT update certain fields when left blank?
if(trim($email) == '') { /* don't update */ }
This is better:
if ( empty( trim( $email ) ) )
{
// do not update
}
else
{
// update
...
}
if(trim($email) == '') {}else{ YOUR UPDATE SCRIPT HERE }
精彩评论