Jump to content

Recommended Posts

Posted

Hi co-programmers,

I try to write the value of an url segment to a session. All works fine as long as there IS a segment, but the moment there is no segment, my values are set to empty or to "assets".

My code is 

if ($input->urlSegment1 && !empty($input->urlSegment1)) {$session->set("region", $input->urlSegment1);}

I just want the session-value to be left alone when I go back to the start page (which has no segments) and not to be changed. Any ideas what I am doing wrong?

Thanks,

Bernhard

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...