No need to submit new HTML forms-jerrylsxu is usually implemented by ajax for no need to submit new forms. Some time ago, I learned from the boss that another method of refreshing new forms is implemented using the iframe framework. Now let's sort it out and share it with you.
First:
(Html page)
No refreshing form submission
(PHP page: form. php)
Alert ("the user name or password is blank! "); Script '; exit;} // verify the password if ($ _ POST ['uname']! = 'Jack' | $ _ POST ['pwd']! = '000000') {echo'
(PHP page: form. php)
0, 'msg '=> ''); // obtain the submitted data $ name = $ _ POST ['username']; $ pwd = $ _ POST ['userpwd']; // simulate logon verification $ user = array (); $ user ['name'] = 'jack '; $ user ['pwd'] = 'jack2014 '; if ($ name! = $ User ['name']) {$ msg ['msg '] =' This user is not registered! '; $ Str = json_encode ($ msg); echo $ str; exit;} else if ($ pwd! = $ User ['pwd']) {$ msg ['msg '] = 'incorrect password! '; $ Str = json_encode ($ msg); echo $ str; exit;} $ msg ['msg'] = 'login successful! '; $ Msg ['status'] = 1; $ str = json_encode ($ msg); echo $ str;