Welcome Guest, Not a member yet? Register   Sign In
whats wrong with this?
#1

[eluser]dadamssg[/eluser]
Ok so im checking a segment of the uri to make sure its set and numeric and then if it is see if i can find the id number in my db, if not redirect. When i enter an id number thats in the db it works, if its a number thats not in the db it redirects...ok good. BUT if i enter in something like "adsg324" i get a 404 and its not redirecting. whats the deal here?
Code:
if (isset($id) && is_numeric($id))
        {
              $yes = $this->Eventmodel->get_exists($id);
              if($yes !== 1){redirect('mains');}
            }
            else
            {
              redirect('mains');
            }


Messages In This Thread
whats wrong with this? - by El Forum - 01-10-2010, 03:22 PM
whats wrong with this? - by El Forum - 01-10-2010, 03:40 PM
whats wrong with this? - by El Forum - 01-10-2010, 03:43 PM
whats wrong with this? - by El Forum - 01-10-2010, 03:45 PM
whats wrong with this? - by El Forum - 01-10-2010, 03:46 PM
whats wrong with this? - by El Forum - 01-10-2010, 03:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB