Member
Member
developing   15-12-2008, 22:52
#1

Im trying to have a random image show up on my homepage, but i want it to link to the actual image page it is contained on but it keeps reloading the page here is the code:

    " title="">
Member
Member
sbillard   15-12-2008, 23:42
#2

What is the while loop for? As coded it only loops once, so seems somewhat redundant.

Also, your code must not be complete--as shown above there are some dangling constructs. To show code on this forum you should enclose it in 'peck' marks. (On a US PC keyboard that is the character below the tilda on the left end of the numeric key row.)

Anyway, somewhere there would need to be the href link to the image page.

Member
Member
developing   16-12-2008, 01:45
#3

Im still getting to grips with php, i removed the loop now, but it still goes to the same album everytime, how do i set it, so that when i click on the random image it takes me to the (random generated image) page

`">`

Member
Member
timo   16-12-2008, 04:29
#4

Alright, I was doing something similar today, and here's what I came up with:

`

Administrator
Administrator
acrylian   16-12-2008, 10:38
#5

You also could have just looked at the existing printRandomImages() and could have adapted it since it does not have any size parameters. But it's a good idea, I will add them.

Member
Member
developing   16-12-2008, 19:26
#6

yeah great that works fine now! appreciate

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.