I've tried this one
<?php $previous_page = $_SERVER['HTTP_REFERER']; ?>
and the result is http://localhost/index.php
how can i get only index.php
I've tried this one
<?php $previous_page = $_SERVER['HTTP_REFERER']; ?>
and the result is http://localhost/index.php
how can i get only index.php
$previous_page = $_SERVER['HTTP_REFERER'];
$path_parts = pathinfo($previous_page);
$result = $path_parts['basename']; //index.php