Hi,
In normal php, We use ?id=123 to send variable through URL.
So, the URL would be www.example.com/page.php?id=123 and then we use $_REQUEST['id'] to receive the variable on another page.
But my question is, if I use "/" instead of "?" (Ex: www.example.com/page.php/id/123), then how to receive the "id" on page.php.
$_REQUEST['id'] doesn't works in this case.
Thank you in advance
URL use "/" instead of "?" to send variables
Moderator: General Moderators
-
cpetercarter
- Forum Contributor
- Posts: 474
- Joined: Sat Jul 25, 2009 2:00 am
Re: URL use "/" instead of "?" to send variables
You need to learn about how to use an .htaccess file and the Apache rewrite module to rewrite URLs. Start by googling "url rewriting".