Welcome Guest, Not a member yet? Register   Sign In
How to keep url clean on calling $this->index()
#6

[eluser]vercoutere[/eluser]
[quote author="OOP-MVC addict" date="1309527900"]You can use ajax if you want to submit and receive data to webserver without redirecting the page if not necessary.
I prefer you read http://jquery.com, and its powerful ajax feature.[/quote]

Ajax isn't really what I was going for though it had allready crossed my mind, thanks for the reply anyway Smile

[quote author="toopay" date="1309528600"]If you still want it to use "php way" rather than "ajax way", you need to configure this stuff:

1. htaccess, so you can provide uri like http://yourdomain.com/somecontroller/somefunction (without index.php). Search over the forums related with this.
2. You either set up a hook, _remap or the simple one : route!. You can set up a route like these
Code:
$route['signin'] = "main/validate_user";
Then now, since you already set an exception on your route file, you can have a simple uri at your form (at view file)
Code:
<form method="POST" action="/signin">
<!--- rest of your form ---->
</form>
[/quote]

I'll look into the rerouting future, thanks for the tip!


Messages In This Thread
How to keep url clean on calling $this->index() - by El Forum - 06-29-2011, 07:47 AM
How to keep url clean on calling $this->index() - by El Forum - 06-29-2011, 07:52 AM
How to keep url clean on calling $this->index() - by El Forum - 06-29-2011, 08:05 AM
How to keep url clean on calling $this->index() - by El Forum - 07-01-2011, 02:45 AM
How to keep url clean on calling $this->index() - by El Forum - 07-01-2011, 02:56 AM
How to keep url clean on calling $this->index() - by El Forum - 07-01-2011, 06:14 AM
How to keep url clean on calling $this->index() - by El Forum - 07-07-2011, 09:27 PM
How to keep url clean on calling $this->index() - by El Forum - 07-09-2011, 02:41 AM
How to keep url clean on calling $this->index() - by El Forum - 07-10-2011, 07:40 PM



Theme © iAndrew 2016 - Forum software by © MyBB