I have two php pages and I want to pass variable value using URL while click on a hyperlink.
Code snip 1: movie1-rev01.php
<html>
<head>
<title>Find my Favorite Movie!</title>
</head>
<body>
<?php
echo "<a href='moviesite-rev03.php?favmovie=Stripes'>Click here to see movie</a>";
?>
</body>
</html>
Code snip 2: moviesite-rev03.php
<html>
<head>
<title>My Movie Site - <?php echo $favmovie; ?>
</title>
</head>
<body>
<?php
echo "My favorite movie is ";
echo $favmovie;
echo "<br>";
$movierate = 5;
echo "My movie rating for this movie is: ";
echo $movierate;
?>
</body>
</html>
When I click on the link on page movie1-rev01.php then it shows an error message "Undefined variable: favmovie in C:\wamp\www\solutions\moviesite-rev03.php"
Please help me out. I'm new in PHP.
$_GET['favmovie'].isset($_GET['favmovie']) ? $_GET['favmovie'] : ''.