I want to define a session in contributed module (field collection module) in drupal 7 when the page is loaded.
This session takes a value from the URL and fill one of the field that depend on it. I defined a session in the form_alter function but I need to refresh the page to let the session take the value? So, could anyone tell me where I can define it? In which function of the module?