Am trying to set a session in foreach loop when users post a form so when they refresh the page the post values won't lost, but the session is not saving.
My Code
<?php session_start();
if(isset($_POST['EventLookUp'])){
/* city state zipcode country*/
$EventPostArgs = filter_input_array(INPUT_POST);
foreach($EventPostArgs as $pname => $pval){
$_SESSION[$pname] = htmlentities($pval);
}
echo $_SESSION['country'];
?>