I have a template in page.php in which I like accessing pages like this:
$podstr = basename(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH));
if($podstr==''){include "pages/index2.php";}
elseif($podstr=='registration'){include "registration.php"; }
elseif($podstr=='login'){include "pages/login.php";}
else echo 'ERROR 404';
It basically takes text in URL after the last slash and I therefore I can use nice URLS such aswww.mydomain.com/registration
I also have a registration form in reg.php. The form (if filled in correctly) redirects to ok.php, especially www.mydomain.com/ok
if(isset($_POST['submitted']))
{
if($fgmembersite->RegisterUser())
{
$fgmembersite->RedirectToURL("ok");
}
}
If I open www.mydomain.com/reg.php (which is without my template of course), everything works perfectly!
If I open www.mydomain.com/registration. The form does not save any data to my database and redirects me do index.php.
Do you have idea where the problem might be?
Thank you very much!