Welcome Guest, Not a member yet? Register   Sign In
can't get link to work
#20

(This post was last modified: 03-25-2016, 02:15 PM by richie41.)

(03-25-2016, 12:59 PM)InsiteFX Wrote: Your product id needs to be passed to the controller from the view link.

It sounds like you are not passing the id to the controller,
you can check the in the details method by doing a echo $id; exit;

like this?
PHP Code:
public function details($id){
        echo 
$id; exit;
        
//Get Product Details
        
$data['product'] = $this->Product_model->get_product_details($id);
        
//Load View
        
$data['main_content'] = 'details';
        
$this->load->view('layouts/main'$data);
    } 

if I put the just put <a href="<?php echo $product->id; ?>"> as the link then it shows the correct id in the URL
Reply


Messages In This Thread
can't get link to work - by richie41 - 03-24-2016, 08:54 AM
RE: can't get link to work - by Paradinight - 03-24-2016, 12:26 PM
RE: can't get link to work - by richie41 - 03-24-2016, 02:59 PM
RE: can't get link to work - by twpmarketing - 03-24-2016, 02:30 PM
RE: can't get link to work - by richie41 - 03-24-2016, 02:48 PM
RE: can't get link to work - by pdthinh - 03-24-2016, 07:01 PM
RE: can't get link to work - by richie41 - 03-25-2016, 02:43 AM
RE: can't get link to work - by richie41 - 03-24-2016, 02:51 PM
RE: can't get link to work - by Wouter60 - 03-25-2016, 02:54 AM
RE: can't get link to work - by richie41 - 03-25-2016, 03:05 AM
RE: can't get link to work - by Avenirer - 03-25-2016, 03:21 AM
RE: can't get link to work - by richie41 - 03-25-2016, 03:22 AM
RE: can't get link to work - by Wouter60 - 03-25-2016, 03:23 AM
RE: can't get link to work - by richie41 - 03-25-2016, 03:41 AM
RE: can't get link to work - by pdthinh - 03-25-2016, 05:46 AM
RE: can't get link to work - by richie41 - 03-25-2016, 11:24 AM
RE: can't get link to work - by InsiteFX - 03-25-2016, 03:54 AM
RE: can't get link to work - by richie41 - 03-25-2016, 04:03 AM
RE: can't get link to work - by InsiteFX - 03-25-2016, 12:59 PM
RE: can't get link to work - by richie41 - 03-25-2016, 01:41 PM
RE: can't get link to work - by Wouter60 - 03-26-2016, 01:20 AM
RE: can't get link to work - by richie41 - 03-26-2016, 03:17 AM
RE: can't get link to work - by Wouter60 - 03-26-2016, 03:43 AM
RE: can't get link to work - by richie41 - 03-26-2016, 03:55 AM
RE: can't get link to work - by InsiteFX - 03-26-2016, 03:33 AM
RE: can't get link to work - by richie41 - 03-26-2016, 03:37 AM
RE: can't get link to work - by Wouter60 - 03-26-2016, 04:51 AM
RE: can't get link to work - by richie41 - 03-26-2016, 04:55 AM
RE: can't get link to work - by Wouter60 - 03-26-2016, 06:02 AM
RE: can't get link to work - by richie41 - 03-26-2016, 06:21 AM
RE: can't get link to work - by Wouter60 - 03-26-2016, 08:01 AM
RE: can't get link to work - by richie41 - 03-26-2016, 08:09 AM
RE: can't get link to work - by veronvynguyen - 03-12-2017, 01:57 PM
RE: can't get link to work - by kieranfitz - 04-21-2018, 04:40 PM
RE: can't get link to work - by InsiteFX - 04-22-2018, 04:27 AM
RE: can't get link to work - by InsiteFX - 04-22-2018, 04:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB