is there any way to create flash session data like in codeigniter,
i want to create it in core php.
I don’t want to use GET method, passing variable with url makes problem in my application.
so, how can i do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Its pretty easy to create a flash message class with PHP sessions.
Make sure you are calling
session_start()first. Then you can add messages usingFlashMessage::add('...');Then if you redirect, you can render the messages next time you render a page
echo FlashMessage::render(). Which will also clear the messages.See http://php.net/manual/en/features.sessions.php