Welcome Guest, Not a member yet? Register   Sign In
Jquery + get data
#1

[eluser]jacobson[/eluser]
Hello I have a problem. I have a function in my controller (function which allows user to enroll to the event) now I want to prevent from executing this function from the URL. I thought mabe to create new library, add these functions there and add if(!basepath)....
But in this case I dont know how to call the library function from the jquery in codeigniter.

thx for responding Smile
#2

[eluser]Twisted1919[/eluser]
make your method like:
Code:
public function enroll()
{
   if(!$this->input->is_ajax_request())
   {
      show_error('Direct access denied!');
   }
   [continue here]
}




Theme © iAndrew 2016 - Forum software by © MyBB