Welcome Guest, Not a member yet? Register   Sign In
flash_data question
#1

[eluser]mattskelton[/eluser]
Hi,

Can the flash_data method be used when doing a simple query and displaying the result? Example, the user requests 'http://localhost/index.php/chair/481'. The item 481 doesn't exist. I want to set flash data in the controller to say,' sorry item doesn't exist' in the view page. However, the flash_data variable is empty until i refresh the view. Can flash_data be used in a single http request I.e. controller->model->controller->view?

Thanks,

Matt
#2

[eluser]Crimp[/eluser]
Nope. You may want AJAX.
#3

[eluser]Pascal Kriete[/eluser]
You could make a mini helper view that you only load when the item doesn't exist. That way you don't always have the div floating around when it isn't needed.
#4

[eluser]mattskelton[/eluser]
@inparo
Not a bad idea. Thanks




Theme © iAndrew 2016 - Forum software by © MyBB