0

my controller code is-

<?php 
class Site extends CI_Controller
{

   function index()
     {
           echo "Under Construction.";
     }


   function signup()
     {
       $this->load->model('site_model');
       $data['countries']=$this->site_model->get_countries();
       $this->load->view('signup_view',$data);
     }

   function login()
     {
           echo "This is working.";
     }
}
?>

When i open signup page .the signup view repeats many time.

3
Contributors
4
Replies
6
Views
4 Years
Discussion Span
Last Post by gon1387
0

This is my model code-

<?php
class Site_model extends CI_Model
{
      function get_countries()
        {
           $sql="SELECT * FROM countries";
           $query=$this->db->query($sql);
           return $query->result();
        }
}
?>
2

The model is fine. In your /application/config/config.php set:

$config['log_threshold'] = 4;

then reload the page and check the generated log inside /application/logs/ that should help you to find the problem, note that logs directory needs write permissions.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.