PHP session variable for list href choice
Posted: Sat May 07, 2016 8:52 pm
Hi I need to figure out a way to retain a visitors choice of region when they first visit my site.
This is what I have so far:
how do I make sure that if North America is chosen then that that link is highlighted and vice versa.
This is what I have so far:
Code: Select all
session_start();
if(isset($_GET['region'])){$_SESSION['region'] = $_GET['region'];}
<li><a href="#" id="region">North America </a></li>
<li><a href="#" id="region">Asia</a></li>