• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Function not working

#3
[eluser]phalkan[/eluser]
Here is my products controller
<?php

class Products extends Controller {

function Products()
{
parent::Controller();

$this->load->helper('url');
$this->load->helper('form');

}

function index()
{

$this->load->model('categorymodel','', TRUE);
$data['categories']=$this->categorymodel->getCategories();
$this->load->view('category_view',$data);

}

function getCategory()
{
echo 'category testing...';

}

this is what I have set up in my routes page $route['default_controller'] = "products";

When I click on a link it puts in the url http://localhost/mysite/index.php/products/getCategory which is supposed to run the getCategory() function in the products controller and echo "category testing...", it does not.
Any idea why not?

Thanks for any help.


Messages In This Thread
Function not working - by El Forum - 09-22-2008, 03:20 PM
Function not working - by El Forum - 09-22-2008, 05:07 PM
Function not working - by El Forum - 09-24-2008, 09:18 PM
Function not working - by El Forum - 09-24-2008, 10:20 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.