CodeIgniter Forums
Url and 404 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Url and 404 (/thread-36382.html)



Url and 404 - El Forum - 11-30-2010

[eluser]katama[/eluser]
Hello, I have the parameters from the POST pass in the url after redirect.
But if you remove the segments from the url, like so, for example, prop/add/sell//4//0//1, then nothing happens, or parameters are incorrect, as all completely tied to the url
How can I compare this with existing url parameters, and if this parameter is not present or it incorrent, then show the 404 ..? All parameters in the url are mandatory. I get them by $this->uri-> segment(), and that's why i have problems..


Url and 404 - El Forum - 11-30-2010

[eluser]keithics[/eluser]
have it using an if else statement..

like:

if($variable){
// do something..
}else{
//do something
}


Url and 404 - El Forum - 11-30-2010

[eluser]katama[/eluser]
fivel, good idea, buy I was thinking about something more global thing.. and where will be better $this->uri -> segment() be situated in contorller, or in model or in view? thanks


Url and 404 - El Forum - 11-30-2010

[eluser]katama[/eluser]
It was stupid problem. really if else ))


Url and 404 - El Forum - 11-30-2010

[eluser]keithics[/eluser]
no problem, glad it helped you.


Url and 404 - El Forum - 12-01-2010

[eluser]katama[/eluser]
thanks