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.

What do you get from the error log? Can you post the site_model code?

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();
        }
}
?>

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.

Any luck?
Can you show us you're view if you haven't found any problem with the log.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.