![]() |
Random Images
How can I get a random image to pop up on the adopts pages, not everytime it loads.... just randomly, and random pictures? I want to make a sort of trick or treat hunt for my members.Once they see an image they click it and it is added to a special page they can access. I know how to do all that, I just don't know how to get the random images to show up.
What if I made a new table called treats? and inserted all the images into it. Then on the adopts page I could make them echo out randomly. Then once it's clicked, run a query that inserts the image into a new field in the users table. But how could I make the image NOT show up every time the page is clicked? |
you can try this
PHP Code:
|
Ooooo thank you!! Will try this now =)
EDIT: Ok so maybe I should know how this works. I added in some images and when I refresh I'm getting a broken image every time. How about show a random image every 10 minutes? |
i editted the thing a lil bit, uhm check the echo i did, maybe theres an typo in it, and i think it would require cronjobs or a time stamp in a database table, and delete it every 10mins after it was entered.
Edit: u can experiment with it, i really gotta go back to my homework for tomorrw x3 |
i saw the error on your site, fixed
|
[s]Now I get this... Parse error: syntax error, unexpected T_VARIABLE, expecting '(' in /home/robynswo/public_html/myadopts.php on line 19[/s]
LoL =) Ok so I'm not good with cron jobs.... what would I need to do? edit: actually I'm not seeing the image at all... I changed echo to $article_content .=" too and still nothing.. hmm |
i already fixed it for u in my post, it should work now
|
i found one, it looks like a vampire :D, somehow it changed ur font size? :o?
btw link should be myadopts.php?treat=id |
YEa I fixed that part. Thanks for the start! I'll play with it a bit today. If I can't get it working at least I can probably fix it before next Halloween LOL
I've yet to see one O.o Ha! Got one.. now to figure out how to save it to a user and show it on a new page. ugh. |
maybe you're better of with using the adopt.php link and limit it to one per acc
|
All times are GMT -5. The time now is 04:09 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.