Welcome Guest, Not a member yet? Register   Sign In
Is there a way of detecting POST data in URL requests before routing them?
#6

[eluser]Cristian Gilè[/eluser]
[quote author="sorenchr" date="1296059864"][quote author="Cristian Gilè" date="1296018541"]
Quote:
Code:
if(isset($_POST))
{
  $route['everything'] = "ajax/".theroutehere;
}

It should work. You can use the ternary operator for more elegant code:

Code:
$route['everything'] = isset($_POST) ? "ajax/".theroutehere : 'controller/method';

but, what doesn't work? Please, could you post some code?


Cristian Gilè[/quote]

The example was for illustration purposes only, I am quite sure it doesn't work.[/quote]

I'm sure it works.


Cristian Gilè


Messages In This Thread
Is there a way of detecting POST data in URL requests before routing them? - by El Forum - 01-26-2011, 05:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB