Welcome Guest, Not a member yet? Register   Sign In
simple get() question

I have the following code in my view. When I click the link, I get sent to the appropriate page. The only thing that I can't figure out is how to access the variable from part_details. I know I'm supposed to use

echo '<tr><td class="pic_title" align="center">' .
     anchor("welcome/part_details", $fpc[$f]['type'], "sn='1234'");
echo '</td></tr>';

echo $this->input->get();

I've tried a million variations of the above. I know I'm doing something wrong, just not sure what it is. Any ideas?


anchor("welcome/part_details/".$fpc[$f]['sn'], $fpc[$f]['type'], "sn='1234'");

$fpc[$f]['sn'] should output the 1234 (the part sn pulled from your table)
in the controller function part_details()

$part_number = $this->uri->segment(3);
use then $part_number to look the part record in the part table, and show the details...

Try using the code tags!

Thanks for the help, the URI method worked. I don't even need the extra attribute at the end. It would be nice if the CI documentation mention this when discussing get(). The URI documentation is fine, but it doesn't make a connection between the two, strange.

Theme © iAndrew 2016 - Forum software by © MyBB