<?php
// Start the session
session_start();
?>
<!DOCTYPE html>
<html> 
<head>
    <script>
        var a="Hello";
    </script>

</head>
<body> 
<script>
 
var queryString = decodeURIComponent(window.location.search);
queryString = queryString.substring(1);
var queries = queryString.split("&");
for (var i = 0; i < queries.length; i++)
{
  document.write(queries[i] + "<br>");
}
 
</script> 

<?php 
        echo $variable = "<script>document.write(a)</script>"; //I want above javascript variable 'a' value to be store here
    ?>
<?php
// Set session variables
$did=$_SESSION["favcolor"];
echo '<script type=\'text/javascript\'>'; 
            echo 'alert("driver id is'.$did.'");'; 
            echo '</script>';
$_SESSION["favanimal"] = "cat";
echo "Session variables are set.";
?>
<?php
echo "<h1>Screen Resolution:</h1>";
echo "Width  : ".$_GET['vee']."<br>";

?>

</body>
</html>


