PHPのおかげでリダイレクトを行っていますが、リダイレクトはまったく行われません(ただし、他のすべてのリダイレクトを作成します)。
これが私が実装したコードです:
<?php 
session_start();    // pour pouvoir récupérer /creer desvariables de session
try
{
    $bdd = new PDO('mysql:host=localhost;dbname=youf', 'root', 'root');
}
catch(Exception $e)
{
        die('Erreur : '.$e->getMessage());
}
$redirection="command.php";
if (!isset($_SESSION['Login'])){ header('Location: connect.php'); } // Si pas de sessionactives, redirect
    if (!isset($_SESSION['CommandId'])){
        $long = strlen($_SESSION['Login']);
        $table = $_SESSION['Login'][$long-2].$_SESSION['Login'][$long-1];
        $zone = $_SESSION['Login'][$long-4].$_SESSION['Login'][$long-3];
        $createCommand="INSERT INTO `youfood`.`command` (`Number`, `Date`, `isPaid`, `Table`, `Zone`, `Server`, `State`) VALUES (NULL, current_date, '0', '".$table."', '".$zone."', '".$_SESSION['NumberEmployee']."', '5');";
        $bdd->query($createCommand);
        $sqlCommandNumber=$bdd->query("SELECT * FROM  `command` WHERE  `Table` =".$table." AND  `Zone` =".$zone." AND  `State` =0 LIMIT 0 , 1");
        $commandNumber="";
        while ($data=$sqlCommandNumber->fetch()){
            $commandNumber = $data['Number'];
        }
        $_SESSION['CommandId'] = $commandNumber ;
        header('Location: actionValidateCommand.php');
        $redirection="actionValidatedCommand.php";
    } else {
        foreach ( $_SESSION['cart'] as $key => $value ) {
            if($value != 0){
                $sql = "INSERT INTO  `youfood`.`commanddishe` (`Number` ,`command` ,`Dishe` ,`Quantity`)VALUES (NULL, '".$_SESSION['CommandId']."', '".$key."', '".$value."')";
                $bdd->query($sql);
                $messagee = $messagee."<br />".$sql."<br />";
                $_SESSION['cart'][$key] = 0 ;
            }
        }
    header('Location: command.php');
    $redirection="command.php";
}
?>
<!DOCTYPE html> 
<html> 
また、リダイレクトされないページのhtml結果を調べると、タグの前にスペースが表示されます。どこにスペースができているのかわからないし、間違いだと思います!
私を助けてくれてありがとう:-)