Welcome Guest, Not a member yet? Register   Sign In
Flashdata strange troubles
#1

[eluser]DocFunky![/eluser]
Hi everyone, I've been dealing with flashdata for hours and I really don't understand where does my problem comes from.

here it is, I just add a flashdata in my controller, smthg like that :
Code:
$product = $this->Front_model->getProduct($id);
$this->session->set_flashdata('product', $product);
When i "print_r" my session information, I see my flashdata :
Quote:[flash:new:product] => Array
(
[product_id] => 11
[product_catid] => 53
[product_title] => AutoRadio Réveil BIGBEN
[product_description] => Tourne-disques radio CD encodeur MP3. Tourne-disques 3 vitesses (33 / 45 / 78 Tours). Lecteur CD / MP3. Port USB 2.0. Lecteur de cartes SD / MMC (carte non fournie). Encodeur : Enregistrez directement vos vinyles ou vos CD sur votre clé USB ou carte SD / MMC en MP3. Fonction programme et «repeat». Affichage LCD avec rétro-éclairage bleu. Radio AM / FM. Fonction «bass boost». Télécommande. Prise AUX. Prise casque (casque non fourni). Alimentation secteur. Dimensions 38.5 x 37 x 18.5 cm.
[product_price] => 99
[product_buy] => 1
[product_image1] => utilities/images/products/2551GV4N0001GV4N_Z.jpg
[product_image2] => utilities/images/products/2551GV4O0001GV4O_Z.jpg
[product_image3] =>
[product_image4] =>
[product_discount] => 0
[product_thumb] => utilities/images/products/thumbnails/2551GV4N0001GV4N_Z_thumb.jpg
)

My problem is when I want to use this flashdata in the next view, it doesn't print anything., in other terms, this doesn't work :
Code:
echo 'produit'.$this->session->flashdata('product_id');
and doesnt print me anything, just as :
Code:
print_r($this->session->flashdata('product'));

Anyone see an error in my code ? Maybe it comes from a parameter I didn't activate ?

Thanks for your help Smile




Theme © iAndrew 2016 - Forum software by © MyBB