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

[eluser]jordantkj[/eluser]
Hi,
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
Code:
$this->input->get();

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

part_details
Code:
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?

-Tyler
#2

[eluser]weboap[/eluser]
try
Code:
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()

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

[eluser]InsiteFX[/eluser]
Try using the code tags!
#4

[eluser]jordantkj[/eluser]
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