function secure($value)
{
$value = trim($value);
if(get_magic_quotes_gpc())
{
$value = stripslashes($value);
}
if(function_exists('mysql_real_escape_string'))
{
$value = mysql_real_escape_string($value);
}
else
{
$value = addslashes($value);
}
return $value;
}
this is not a proper security function and if you want to build a simple framework start looking into design patterns such as "frontcontrollers" , "app controllers", "registery" , "bootstrapping" , "routing( for url parsing!)" , autoloading as framework's require alot of files to work toghther to make a big picture make it easy to load them".
i currently am working on advanced php 5.3 framework that brings alot of new things to the table.... and all in all uncomplicated.....