Thank you for your reply.
Here is the updated first part of the code
<?php
if(isset($_GET['SearchTag'])) {
$_SESSION["$SearchTerm"] = $_GET['SearchTag'];
$_SESSION["$SearchTerm"] = preg_replace("#[^0-9a-z]#i","",$SearchTerm);
}
?>
I am getting these errors
Notice: Undefined variable: SearchTerm in C:\wamp\www\siteroot111\untitled4.php on line 7
Notice: Undefined variable: SearchTerm in C:\wamp\www\siteroot111\untitled4.php on line 8
thanks again :)