<?php session_start();
$name=$_POST["name"];
$name=htmlspecialchars($name,ENT_QUOTES);

$url = '../e-shop.php?search='.$name;
$_SESSION["search"]=$name;
echo "<script language='javascript' 
type='text/javascript'>";  
echo "window.location.href='$url'";  
echo "</script>";  
?>