Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
How to show message without using session_flash
  • Now i am learning about fuelphp. Now i want to show message without using session. Could you explain to me please.
  • echo "This is a message"; ?

    Or do you mean something else? If so, please explain what you are trying to do or what you want to achieve.

    In general, web applications are stateless, so if you want to pass something from one request to the next, there is only one option, and that is to use sessions to maintain state.

    This is not FuelPHP specific, this is how every PHP application works.
  • Thank alot For your explain.
    i want to show a message when login success like the following
    \Messages::success(__(<span class="string">'login.success'</span>);
    without using
    session_flash();
    How can i use this function?
  • As said before, web applications are stateless.

    So if you do something in request A (for example process the POST of a login form), and you then redirect to another page (with will becode request B), you need a mechanism to pass information from A to B. That mechanism is called a session, you can't live without if you want to maintain state between requests.

    You could come up with custom solutions to maintain state so that you can pass information, but in the end that is exactly what session does. So why re-invent the wheel.
  • Thank you Mr.Harro Verton for giving to me a web application knowledge.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion