I need to make a movie rater website and on the front page it has the ten most recently added movies. Whenever you click on the movie title its supposed to take you to another page where you can see more info on the movie. I cant seem to get my a href to properly send any of the data to the other page.
code for displaying my homepage
while($row = $result->fetch()){
$MovieName = $row['name'];
$MoviePic = $row['picture'];
echo "<div align=center>";
if($i==1){
echo '<tr>';
}
$id = $row['MovieId'];
echo '<td><a href = "MovieInfo.php?id = $id"> <img src="data:image/jpeg;base64,'.base64_encode( $MoviePic).'"width = 115 height = 150 name = $MovieName/>';
echo "<br>";
echo $MovieName, '</td>';
echo "</a href>";
echo "<br>";
$i = $i + 1;
if($i==4){
echo '</tr>';
$i=1;
}
}
code from the second webpage
<?php
require('DBConnect.php');
echo "<div align=center>";
if(isset($_GET['id'])){
$Name = $_GET['id'];
}
else{
$Name = 'no';
}
echo $Name;
currently, I'm just testing with the movie's id but no data is being sent to the new page.