I want to use session_id()
as a reference when the visitor enters the photos attached to an advertisement. When visitors clicked finish I want to kill the session so that user can add a new ad (with new id), but how hard I try, it's the original session_id
(): is shown.
It seems to kill the session where I want but when I reload the page the same old session id back. Any help will be highly appreciated.
<?php
session_start();
$_SESSION['ad'] = session_id();
// Do what ever and then kill the session
session_unset();
session_destroy();
$_SESSION = array();
?>