Okay I'm really new to this, but I'm trying to put a photo on my website that would change randomly (drawing from a folder of photos) each time the user clicked a button saying "random photo". It seems like php is the best way to do this, except...
All the codes I've tried don't work; all that shows up is the little "broken image" icon. The code I'm using right now for the php is..
<?php
funtion $get_img_link()
{
$images = glob("*.jpg") //Assuming jpg files
$selected = $images[rand(0, count($images) - 10)];
return "images/random/";
}
?>
I'm not sure what my problem is, but I'm thinking it could be:
1) I don't have SQL (do you need this?)
2) I'm not linking to the php from my html page properly?
3) Something's wrong with the code?
please, Please, PLEASE help me, I'm dying. Thanks🙂