CodeIgniter Forums
simple get() question - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: simple get() question (/showthread.php?tid=51581)

simple get() question - El Forum - 05-09-2012

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?


simple get() question - El Forum - 05-09-2012

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...

simple get() question - El Forum - 05-09-2012

Try using the code tags!

simple get() question - El Forum - 05-10-2012

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.