Retrieving url using session variable
Posted: Wed Apr 15, 2009 8:00 am
hi all
i am new to this forum and this is my first post
please help me..
my website is in php,html,sql
i have wriiten a code shown below
if i am in the page http://www.test.com/index.php
$_SESSION['page'] has the value 'index.php'
ie if i am on http://www.test.com/abc.php $_SESSION['page]] has the value abc.php
that code is working fine.
but my problem is that
if the url is http://www.test.com/abc.php?catid=56
the rest part of abc.php ie '?catid=56' is not retrieved..
how can i get that also??
give me a solution, please....
i am new to this forum and this is my first post
please help me..
my website is in php,html,sql
i have wriiten a code shown below
Code: Select all
session_start();
$pagename=pathinfo($_SERVER["PHP_SELF"]);
$pagename=$pagename["basename"];
$_SESSION['page']=$pagename;$_SESSION['page'] has the value 'index.php'
ie if i am on http://www.test.com/abc.php $_SESSION['page]] has the value abc.php
that code is working fine.
but my problem is that
if the url is http://www.test.com/abc.php?catid=56
the rest part of abc.php ie '?catid=56' is not retrieved..
how can i get that also??
give me a solution, please....