Ciao.
Codice PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
*{ 
    margin:0px; 
    padding:0px
}
input,textarea{ 
    width:150px
}
textarea{ 
    height:150px 
}
</style>
</head>

<body>
<?php 
function redirect($page){
        
$host$_SERVER['HTTP_HOST'];
        
$urirtrim(dirname($_SERVER['PHP_SELF']), '/\\');
        
$extra$page;
        
header("Location: ");
        exit();

function 
getPost($key){
        return isset(
$_POST[$key]) ? $_POST[$key] : null;
    }
function 
getGet($key){
        return isset(
$_GET[$key]) ? $_GET[$key] : null;
    }
function 
formHasPropriety(){
    
$hasPropertytrue;
    
$argsfunc_get_args();
    foreach(
$args as $arg){
        if(
is_null(getPost($arg))){
            
$hasPropertyfalse;
        }
    }
    return 
$hasProperty;
}
if (
is_null($action=getGet('action'))){
    
$action'form';
}
if (
$action=='form')

?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>?action=new_item" method="post" name="frm">
<input name="check_from" type="hidden" value="<?php echo time();?>" />
<input name="title" type="text" maxlength="50" />

<textarea name="description" cols="30" rows="30"></textarea>

<input name="save_item" type="submit" value="Save" />
</form>
<?php 
}
elseif(
$action=='new_item')
{
    if(
formHasPropriety('check_from','title','description','save_item')){
        
//validation
        //input filter ie strip_tags 
        
echo 'Insert new_item';
    }
    else{
        
redirect('404.php');
    }
}
else{
    
redirect('404.php');

?>
</body>
</html>
Che ne pensate può andare ?

Conoscete un metodo migliore ; ?

function redirect($page){
$host= $_SERVER['HTTP_HOST'];
$uri= rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
$extra= $page;
header("Location: http://$host$uri/$extra");
exit();
}