Hello 🙂
I've created a simple slideshow, using url parameters to keep the state, like in this sample:
http://mysite.com/mypage.php?slide=3
Now I'd like to use something more elegant; the best I could come up is a solution in which
every action ('next','prev') points to a separate php file manipulating session variables.
See code:
<?php // back.php
session_start();
if (isset($_SESSION["slide"])) $_SESSION["slide"]--;
header("Status: 301 prev slide");
header("Location: mypage.php");
?>
I'm sure there are many other ways; I'm not really satisfied with this approach.
Anyone with a better solution?
TIA, Greta