Avatar of ChrisTERiS
ChrisTERiS

asked on 

Detecting incoming URL

Example: I'm on the file category.php where there is a link to article.php. Ofcourse when the uers clicks on the link is redirecting to article.php. The question is: What code I need to add in article.php to capture the incoming url (in this case category.php)?
$_SERVER['REQUEST_URI']  is giving article.php and not category.php
JavaScript

Avatar of undefined
Last Comment
ChrisTERiS
ASKER CERTIFIED SOLUTION
Avatar of Kash
Kash
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of ChrisTERiS
ChrisTERiS

ASKER

Fantastic. Actually I didn't used session, but rather I stored it in a variable eg:
$inboundurl = $_SERVER["HTTP_REFERER"];
and works fine.
JavaScript
JavaScript

JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.

127K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo