Support the ongoing development of Laravel.io →
posted 10 years ago
Session
Last updated 2 years ago.
0

If you wish to use PHP for this, then you need to submit the form so the session can be saved into the session using Session::put('key', 'season1'). Then on page reload, the Session::has() will know what to do.

The second alternative which is to use jQuery to detect a change in selection and load the content for season 1 or 2 depending on what's selected.

Last updated 2 years ago.
0

Yes, but how do I put the user selected season from the drop-down list into Session::put('key', 'season#')? I don't want to have multiple lines of Session::put('key', 'season#') because multiple tables would be displayed.

Last updated 2 years ago.
0

In your controller: Session::put('season', Input::get('season'));

That puts the value of the selection in your options list.

This is very basic stuff, you should read up on PHP in general so you don't get stuck on this kind of stuff in the future.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

tyr5577 tyr5577 Joined 27 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.