Root paths for form submit |
[eluser]Dandy_andy[/eluser]
I am using a global header for my site which has various options that dynamically change depending on the page being viewed. One of the issues I have is with form submits because of the controller paths. To try and explain this simply, one of the forms in my header template has the following:- Code: <form name="logout" id="logout" method="post" action="logout"> When the header is called up from a controller at say www.site.com/controller, then the "logout" controller is accessed fine. But now I have added additional tiers to my controllers in order to create various site functions, I cant access the "logout" controller if I am at say www.site.com/user/controller as the post is looking for "logout" at that level. Is there a simple way to create an absolute path without having to pass variables through the controller? I have tried the following but it doesn't work:- Code: <form name="logout" id="logout" method="post" action="<?php echo ($_SERVER['DOCUMENT_ROOT']); ?>/logout"> |
Messages In This Thread |
Root paths for form submit - by El Forum - 06-08-2012, 02:43 PM
Root paths for form submit - by El Forum - 06-08-2012, 03:13 PM
Root paths for form submit - by El Forum - 06-08-2012, 03:52 PM
|