mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-05-29 06:43:11 +00:00
I have no clue what I added here
This commit is contained in:
parent
674a25dcba
commit
310510b686
4 changed files with 14 additions and 8 deletions
12
image.php
12
image.php
|
@ -27,7 +27,15 @@
|
|||
$image_results = mysqli_query($conn, $get_image);
|
||||
$image = mysqli_fetch_assoc($image_results);
|
||||
|
||||
echo "<img class='image' src='images/".$image['imagename']."' id='".$image['id']."'>";
|
||||
if ($image['imagename'] != "") {
|
||||
$image_name = "images/".$image['imagename'];
|
||||
$image_alt = $image['alt'];
|
||||
}else{
|
||||
$image_name = "assets/no_image.png";
|
||||
$image_alt = "No image could be found, sowwy";
|
||||
}
|
||||
|
||||
echo "<img class='image' id='".$image['id']."' src='".$image_name."' alt='".$image_alt."'>";
|
||||
|
||||
if (!isset($_GET['id'])) {
|
||||
echo "cannot obtain image";
|
||||
|
@ -40,7 +48,7 @@
|
|||
echo "<p>ID: ".$image['id']."</p>";
|
||||
echo "<p>File Name: ".$image['imagename']."</p>";
|
||||
echo "<p>Upload Date: ".$image['upload']."</p>";
|
||||
echo "<p>Description: ".$image['alt']."</p>";
|
||||
echo "<p>Description: ".$image_alt."</p>";
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue