I have the following code from mysql.
if ($result = $mysqli->query("SELECT * FROM movies")) {
if (mysqli_num_rows($result) > 0) {
// output data of each row
while($row = mysqli_fetch_assoc($result)) {
echo '<span class="image">';
echo'<img id="'. $row["movie_ID"] .'" src=" ' .$row["bild"]. ' "/>';
echo '</span>';
echo '<a href=" ' . $row["link"] . ' ">';
echo '<h2>' . $row["name"] . '</h2>';
echo '<div class="content">';
echo '<p>' . $row["short"] . '</p>';
echo '</div>';
echo '</a>';
}
} else {
echo "0!";
}
mysqli_close($conn);
}
My code works, but now I want to change it so that when I click on it, it opens my defined php site and my image href is input there.