I'm building a website for a hair saloon. I got all the time that i need so I i started to build my MVC framework just to better understand MVC. The core of MVC is url rewriting.
RewriteRule ^(.*)/?$ index.php?url=$1 [L]
That would result in this...
www.example.com/register
$_GET['url'] = 'register'
I decided to make the page post/redirect/get pattern. So when I redirect, the url should be something like this...
www.example.com/register/John/Doe/mail
or something similar. That value is entirely in the $_GET['url'] variable. Is there a way to make the url look like this...
www.example.com/register/?name=John&lastName=Doe&mail=johdoe@gmail.com
which would be accessabile with $_GET['name'], $_GET['lastName'] etc...?
I know that there is an entire uri in the $_SERVER['REQUEST_URI'] variable, but i was wondering is there a cleaner way to get the values?