I am looking to use jquery to add to the DOM for an <ul>
, I want to add more <li>'s
into the list, but just to last for a session with php.
e.g.
$lists = $_SESSION['names']
//which contains an array of all the 'names', and then I would run a loop:
echo "<ul>";
foreach($lists as $list) {
echo "<li>$list</li>";
}
echo "</ul>";
So the user can add these variables into the list, during this session. How would this be done, and how is the jquery able to interact with php like this? And what method would be easiest?