Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I have this code so far: I'd also like to make a picture link, if you could help me with that. Short explained: I want the image to link to the next id.
- <?php
- if (isset($_GET['id']))
- {
- $id = intval($_GET['id']);
- $sql = "select * from people WHERE id=$id LIMIT 1";
- $result = mysql_query($sql) or die ("Kunne ikke koble til databasen. " . mysql_error());
- while ($row = mysql_fetch_assoc($result))
- {
- echo "<div class=\"picture\">";
- echo "<p>";
- // Link
- echo "<a href=''><img src=\"../uploads/" . $row['filename'] . "\" alt=\"\" /></a>";
- echo "</p>";
- echo "</div>";
- }
- }
Add Comment
Please, Sign In to add comment