I am trying to pass a variable to PHP page using URL GET but I get blank space, what is wrong?!
url: http://localhost:2651/index_main.php?teamName=Liverpool
here is the destination PHP file:
<?php
$teamName = $_GET['teamName'];
?>
<html>
<body>
<?php
$searchQuery = $api->searchTeam(urlencode('<?php $_GET["teamName"]; ?>')) // here must get the team name from previous page
?>
<h3>All home matches of <?php echo $team->_payload->name; ?>:</h3>
</body>
</html>