Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- $(document).ready(function(){
- $('form').on('submit',function(){
- $.ajax({
- type:'post',
- url:'<?php echo base_url(); ?>users_controller/login_check',
- data: {
- username:'username',
- password:'password'
- }
- success:function(detail)
- {
- if(detail !== 'error')
- {
- window.location.href=detail;
- }
- else
- {
- $('.error').html('');
- $('.error').html('<p class="alert alert-danger">Invalid username or password</p>');
- $('.error').show();
- }
- }
- });
- return false;
- });
- });
- </script>
Add Comment
Please, Sign In to add comment