1session_destroy(); // To delete whole session
2// OR
3unset($_SESSION['myVar']); // To delete a session var
1<?php
2 session_start(); // start session
3 session_destroy(); // Delete whole session
4// OR
5unset($_SESSION['username']); // delete any specific session only
6?>
1// Create a session variable called something like this after you start the session:
2$_SESSION['user_start'] = time();
3
4// Then when they get to submitting the payment, just check whether they're within the 5 minute window
5if (time() - $_SESSION['user_start'] < 300) { // 300 seconds = 5 minutes
6 // they're within the 5 minutes so save the details to the database
7} else {
8 // sorry, you're out of time
9 unset($_SESSION['user_start']); // and unset any other session vars for this task
10}