• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Url and 404

#1
[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..

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

like:

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

#3
[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

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

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

#6
[eluser]katama[/eluser]
thanks


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.