This post explains how to get the current page url using simple php code. Check the below function will generate the current page URL. function currentPageURL() { $curpageURL = "http"; if ($_SERVER["HTTPS"] == "on") {$curpageURL.= "s";} $curpageURL.= "://"; if ($_SERVER["SERVER_PORT"] != "80") { …