My current address is: http://localhost/bookstore/bookedit.php?book_id=12
The $_SERVER['PHP_SELF']
variable is a string '/bookstore/bookedit.php'
,
But I would like to get the string 'bookedit.php?book_id=12'
,
Do we have any function or variable can do this?
Thanks!
If you do a var_dump($_SERVER)
you will see all of the server variables you have available to you
$_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];