hi,
i'm writing one of my first classes.
when a problem occurs, the class is escaped and the page reloaded with an error message thank to the querystring.

I always get a message that tells me that the redirect can't be done etc.

Does anyone have a clue why?

PHP Code:
class Validator {

var 
$redirectLink;
var 
$idata;
var 
$minsize;
var 
$maxsize;
var 
$pattern;
var 
$different;
var 
$same;

  function 
Validator () 
  {


      
$this->redirectLink  $_SERVER['PHP_SELF'];


  }


function 
validateData($idata$minsize$maxsize$pattern=false$different=false$same=false) {


      
$this->idata         $idata;
      
$this->minsize       $minsize;
      
$this->maxsize       $maxsize;
 
    
$this->checkMinSize();
    
$this->checkMaxSize();
/*
    if ($this->pattern) {
        $this->checkPattern();
    }

    if ($this->different) {
        $this->compareArrayElementsDifferent();
    }

    if ($this->same) {
        $this->compareArrayElementsSame();
    }
*/
  
}


function 
checkMinSize()
{

        if(
strlen($idata) < $this->minsize)
        {
            
$this->redirect('minsize');
        }


}


function 
checkMaxSize() 
{

        if(
strlen($idata) > $this->maxsize) {
            
$this->redirect('maxsize');
        }

   

}

function 
redirect($error_reason)
{

    
header('Location: ' $this->redirectLink '?error=' $error_reason);
    exit;

}



}

$validate = & new Validator();
$validate->validateData('asdasdasdfsdfsdfsdfsd'2526); 
thanks in advance for your time and your help