Why to catch a variable in View to controller |
[eluser]ludo31[/eluser]
Hello , it's a real problem , how to catch a simple variable in view to controller . I send this variable by link in php it is possible but I don't know the same in Codeigniter : for example when We try to send 2 variables in php here nom and prenom we make like that : Quote:<a href="bonjour.php?nom=Dupont&prenom=Jean">Dis-moi bonjour !</a> so when we try to catch them we do that : Code: <?php so I don't know how to make that in code igniter , I try to see the doc and I think we can use anchor for the link Code: echo anchor('news/local/123', 'My News', array('title' => 'The best news!')); so when we try to send an array Code: $atts = array( how to catch the array or the value in controller ?? thanks
[eluser]meigwilym[/eluser]
The user guide explains all of this. http://ellislab.com/codeigniter/user-gui...views.html If you're having trouble with the language come back and I'll explain. Mei
[eluser]ludo31[/eluser]
[quote author="meigwilym" date="1330347679"]The user guide explains all of this. http://ellislab.com/codeigniter/user-gui...views.html If you're having trouble with the language come back and I'll explain. Mei[/quote] Thanks , but please can you explain me the lats paragraph Code: $this->load->view('site_view',$data, true); My problem is like this : in my controller I need one value as id in 2 functions : // I need to use for example the title number = 079 in 2 functions Code: // my first function in view can you explain me the utility of this Code: $string = $this->load->view('site_view',$data, true); and My question and my only problem is it possible to $data['id'] for all functions without passing in model for each function because they are linking ???? thanks |
Welcome Guest, Not a member yet? Register Sign In |