I can't save session $_SESSION["kokiai"] as array. And I can't use $_SESSION["kokiai"] on other page, what is the problem? What I need to add? Thanks for the answers. Btw, here is a code: <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> Pasirinkite prekes:<br /> <select name="products[]" multiple="multiple" size="3"> <option value="ferrari">ferrari</option> <option>audi</option> </select><p> <input type="submit" value="Claim it" /> </form> </html> </body> <?php session_start(); if (isset($_POST["products"])){ $_SESSION["kokiai"] = serialize($_POST["products"]); echo "<br>Your products was registered"; } else { echo "<br>You haven't chosen any products yet."; } ?><br> <A href="la.php"> See what you chose</A> PHP:
session_start() must go at the top. Before sending ANYTHING (except other headers) to the user's browser. No white spaces, no HTML... nothing. And don't use $_SERVER['PHP_SELF'] like that. It allows XSS attacks.