questo codice mi da l'errore

Codice PHP:
    if (!validEmail($Email))
  {
  
   
header("Location:[url]http://www.miosito.it/contacts.php?msg=the[/url] email is incorrect&name=".$_REQUEST['Name']."&company=".$_REQUEST['Company']."&email=".$_REQUEST['Email']."&phone=".$_REQUEST['Phone']."&country=".$_REQUEST['Country']."&notes=".$_POST['Notes']);
   
   }else{
   
   
header("Location:[url]http://www.miosito.it/contacts.php?msg=Please[/url] fill the mandatory fields, thank you&name=".$_REQUEST['Name']."&company=".$_REQUEST['Company']."&email=".$_REQUEST['Email']."&phone=".$_REQUEST['Phone']."&country=".$_REQUEST['Country']."&notes=".$_POST['Notes']);

ma non funzione nemmeno con trim e con urlencode

così
Codice PHP:
  $what3 "Location:[url]http://www.miosito.it/contacts.php?msg=Please[/url] fill the mandatory fields, thank you&name=".$_REQUEST['Name']."&company=".$_REQUEST['Company']."&email=".$_REQUEST['Email']."&phone=".$_REQUEST['Phone']."&country=".$_REQUEST['Country']."&notes=".$_POST['Notes'];

$what3 trim($what3);
$what3 rawurlencode($what3);
  
  
header("Location: [url]http://www.miosito.it/contacts.php[/url]".$what3); 
come si risolve questo problema in php??

grazie dell'aiuto