Welcome Guest, Not a member yet? Register   Sign In
Internal server error when calling AJAX

So I'm trying to call my "login" method from my "Login" controller via AJAX, with jQuery. But I keep getting an internal server error, saying "The action you have requested is not allowed." I pretty much copied and pasted this from another site I'm working on...

Here's my controller:

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Login extends CI_Controller {
        public function construct() {

public function index() {
        public function login() {
            $email = $this->input->post('email',TRUE);
            $password = $this->input->post('password',TRUE);

Here's the AJAX call:

var email = $('#ltd_email').val();
            var password = $('#ltd_password').val();
            var login_post_data = {
                'email': email,
                'password': password
            $.post('/index.php/login/login',login_post_data,function(result) {

Never mind -- this thread answered my question; for some reason Duck Duck Go didn't give me the result that Google did....:


Theme © iAndrew 2016 - Forum software by © MyBB