开发者

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 }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜