Welcome Guest, Not a member yet? Register   Sign In
how to take the url to became a variable
#19

[eluser]yudahebat[/eluser]
I've change my code as your command
do you mean like this??

Code:
function adm_testimonial($id=0)
    {
        $this->base = $this->config->item('base_url');
        $this->css = $this->config->item('css1');
        $data['css1'] = $this->css;
        $data['base'] = $this->base;
        $data['myrobots'] = '<meta name="robots" content="noindex,nofollow">';
        $data['mywebtitle'] = 'mrputucar | data admin testimonial';
        
        $mymenu = $this->menu->menu_adm();
        $data['menu_adm'] = $mymenu;
    
        //This assumes you used the sample MySQL table
        $user_table = 'admin';
        
        //Load the URL helper
        $this->load->view('adm_testimonial',$data);    
        
    }

and choose_testi function

Code:
function choose_testi($id=0){
    
         /* No need to get segment as thefunction expects the
          * parameter and if not specified the param '0' will be assinged in id default
          */

        //$id = $this->uri->segment(3,0);  // removed
        $this->db->where('id_testimonial',$id);
        $query = $this->db->get('testimonial');
        if($query->num_rows() > 0){ // it should be '$query' not '$user_row' my mistake
            $data[] = $query->row();
        }
        $this->adm_testimonial($data);
  
    }

it didn't produce anything on $data

so

Code:
echo $tanggal;
echo $email;
echo $nama;
echo $isi;

undefined...

anything wrong?? please help..


Messages In This Thread
how to take the url to became a variable - by El Forum - 03-31-2009, 08:17 PM
how to take the url to became a variable - by El Forum - 03-31-2009, 08:20 PM
how to take the url to became a variable - by El Forum - 03-31-2009, 08:48 PM
how to take the url to became a variable - by El Forum - 03-31-2009, 09:30 PM
how to take the url to became a variable - by El Forum - 03-31-2009, 09:35 PM
how to take the url to became a variable - by El Forum - 03-31-2009, 09:56 PM
how to take the url to became a variable - by El Forum - 03-31-2009, 10:00 PM
how to take the url to became a variable - by El Forum - 03-31-2009, 10:04 PM
how to take the url to became a variable - by El Forum - 03-31-2009, 10:05 PM
how to take the url to became a variable - by El Forum - 03-31-2009, 10:09 PM
how to take the url to became a variable - by El Forum - 04-01-2009, 01:23 AM
how to take the url to became a variable - by El Forum - 04-01-2009, 06:11 AM
how to take the url to became a variable - by El Forum - 04-01-2009, 06:28 AM
how to take the url to became a variable - by El Forum - 04-01-2009, 06:36 AM
how to take the url to became a variable - by El Forum - 04-01-2009, 06:45 AM
how to take the url to became a variable - by El Forum - 04-01-2009, 06:55 AM
how to take the url to became a variable - by El Forum - 04-01-2009, 07:09 AM
how to take the url to became a variable - by El Forum - 04-01-2009, 07:14 AM
how to take the url to became a variable - by El Forum - 04-01-2009, 06:33 PM
how to take the url to became a variable - by El Forum - 04-01-2009, 06:40 PM
how to take the url to became a variable - by El Forum - 04-01-2009, 07:36 PM
how to take the url to became a variable - by El Forum - 04-01-2009, 08:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB