Getting variable from uri into controller, then model, then view |
[eluser]ToddyBoy[/eluser]
I've been racking my brain for a few hours with this and it's starting to hurt. I'm sure it's a simple solution. I have a uri - www.mysite.com/lms/listings/edit/3 I have a route Code: $route['lms/listings/edit/:num'] = "lms/listings/edit_listing/$1"; The controller Code: function edit_listing($id) The model Code: function edit($id) When I open the edit_listing view, I have this code Code: <?php There will be more input fields in the form, I just put field in there to test that I can get the data, which I can't. I am getting an error when the page loads. A PHP Error was encountered Severity: Notice Message: Undefined index: listing_address Filename: lms/edit_listing.php Line Number: 72 The head bashing on the table bit is that I have run something nearly exactly the same as this, but without having to rely on the segment from the URI to pass through the chain of events to produce data from the database using basically the same code as above. I have the URI helper autoloaded so I don't think that is the problem. I don't need to run a loop as there is only 1 row of data from the table being returned from the model. Can anyone save my head from further torture? |
Messages In This Thread |
Getting variable from uri into controller, then model, then view - by El Forum - 08-16-2010, 12:40 PM
Getting variable from uri into controller, then model, then view - by El Forum - 08-16-2010, 01:11 PM
|