Welcome Guest, Not a member yet? Register   Sign In
how do I prevent error display if missing argument in URL?
#4

[eluser]BandonRandon[/eluser]
I know this is a little bit of an older post but I am using CI 2.0 and found this method to be simpler. This was the first post I found when searching how to do this so I thought I whould share how I'm doing it.
Code:
public function my_function($id='') //set the field here so it won't return false
    {    
        if($id =='') // if it's empty
        {
            //redirect or show content if empty here
        }
    }

Hope this helps


Messages In This Thread
how do I prevent error display if missing argument in URL? - by El Forum - 03-04-2011, 11:48 PM



Theme © iAndrew 2016 - Forum software by © MyBB