How do I pass the value with a href
when click href link and go next page? Beside that, on the next page how I retrieve the value?
My code:
<?php
$sql = "SELECT DISTINCT movie.image, movie.name, movie.id
FROM movie
INNER JOIN movie_genre
ON movie.id = movie_genre.movie_id
INNER JOIN genre ON genre.id = movie_genre.genre_id
INNER JOIN movie_date ON movie_date.movie_id = movie.id
ORDER BY timestamp DESC LIMIT 6";
$res = mysqli_query($conn, $sql);
if(mysqli_num_rows($res) > 0) {
while($row = mysqli_fetch_object($res)) {
echo '<label class="label1">' . $row->name . '</label><br><br>';
echo '<a href="#"><img src="' . $row->image . '" class="poster"></a>';
echo '<div class = "section3"><a href="synopsis.php?id="' . $row->id . '" >asd</a>    <a href="">Buy Now</a>';
}
}
?>