开发者

On page load for chrome, ie, ff triggers form validation error message in PHP

if($username=="") { $login_domain_error="Enter User Name"; }

if(isset($_POST['passwd'])) {
    $login_p_error="Enter Pa开发者_如何学JAVAssword";

When I enter the above two validation, it triggers the validation errors, without form submission using PHP

What exactly is wrong

Thanks Jean


Well, you're checking if $_POST['passwd'] is set, and if that's the case, you define an error.


What's your error message?

Anyway, you should change if(isset($_POST['passwd'])) { to if(empty($_POST['passwd'])) { and add a } to that.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜