Welcome Guest, Not a member yet? Register   Sign In
Best way to solve unwanted uri characters.
#4

[eluser]eedfwChris[/eluser]
[quote author="sophistry" date="1186625865"]um...
Code:
if ($id ===2)
{
//do sql
}
[/quote]

Uh... ANY number... not just 2...

[quote author="BravoAlpha" date="1186628265"]Cast the id string to an integer? PHP Manual: Type Juggling[/quote]

I just want it to err out if it's anything but an integer.

There isn't some sort of validation that I do with codeigniter specifically for URI segments? In theory I could do something like:
Code:
if (is_numeric($id))
{
// sql
}


Messages In This Thread
Best way to solve unwanted uri characters. - by El Forum - 08-08-2007, 02:56 PM
Best way to solve unwanted uri characters. - by El Forum - 08-08-2007, 03:17 PM
Best way to solve unwanted uri characters. - by El Forum - 08-08-2007, 03:57 PM
Best way to solve unwanted uri characters. - by El Forum - 08-08-2007, 04:35 PM
Best way to solve unwanted uri characters. - by El Forum - 08-08-2007, 06:25 PM
Best way to solve unwanted uri characters. - by El Forum - 08-08-2007, 07:07 PM
Best way to solve unwanted uri characters. - by El Forum - 08-08-2007, 09:24 PM
Best way to solve unwanted uri characters. - by El Forum - 08-09-2007, 12:16 AM
Best way to solve unwanted uri characters. - by El Forum - 08-09-2007, 09:44 AM



Theme © iAndrew 2016 - Forum software by © MyBB