This is a ajax form submit with jQuery. This works good for PHP and PHP codeigniter framwork.
how to use....
in html add jquery file and submit.js plugin file then call formSubmit() jquery function like below.
<script src="jquery-3.1.1.min.js"></script> <script src="submit.js"></script> <script> $('form.ajax').formSubmit(); </script># you have also add a dive in your form page to show error or success message like below
$error_data['status'] = true or false. $error_data['message'] = array( "error or success message"; );
$error_data['message'] = array( 'user_email' => form_error('user_email'), 'password' => form_error('password'), 'password_again' => form_error('password_again'), 'user_name' => form_error('user_name'), 'user_mobile' => form_error('user_mobile') );