[eluser]jonny68[/eluser]
Hi,
i'm trying my best to build a catalogue with CI,
what i'd need is passing variables from a submit in my view to a controller and changing
the uri for the next product after passing through the controller, of course i'd need as
well that a user can go straight to the product simply trough the url..
MY VIEW:
<h1><?php echo $mod;?></h1>
<?php echo img($this->config->item('images').'/'.$img);?>
<p><?php echo $text;?></p>
<!--------Button to redirect user to the other product------------->
<?php
echo form_open('shoes/modello');
$data = array(
'mod' => 'Winter Shoes',
'name' => 'Kindra',
'img' => '2black',
);
echo form_hidden($data);
echo form_submit('submit', 'Kindra Shoe');
echo '</form>';
?>
<!-----------end button----------------->
MY CONTROLLER function:
(I KNOW I CAN PASS PARAMETERS FOR THE URL IN THE CONTROLLER BUT HOW?,
BASECLY I'D LIKE WHEN I CLICK THE BUTTON IN THE VIEW TO BE REDIRECT TO THE SAME VIEW
BUT WITH DIFFERENT PARAMETERS THE ONES TAKEN FROM THE BUTTON AND DIPLAYING IT TO THE URL)
p.s: Sorry i know i sound stupid but i'm just aproaching MVC..
public function modello($mod,$img) {
$data['main_content'] = 'iphone/modello_view';
$this->load->view('template',$data);
}
THANKS A LOT!