PHP Image Rotator

Discussion in 'PHP' started by bbooker01, Sep 17, 2009.

  1. #1
    Hey can someone help me out or tell me how to create a random Image chooser. With the set of images I would like the images to be chosen from folder. Each photo I want to have a link and also I want to be able to put text next to the image and other miscellaneous stuff. An example of this is like on armorgames.com where their random game div box is.
    Thanks for the help in advanced.
     
    bbooker01, Sep 17, 2009 IP
  2. stephan2307

    stephan2307 Well-Known Member

    Messages:
    1,277
    Likes Received:
    33
    Best Answers:
    7
    Trophy Points:
    150
    #2
    Simple.

    Set up a database with the different data you want ie imageurl ect.

    Then you use the following query

    
    SELECT * FROM tablename ORDER BY RAND();
    
    PHP:
    hope this helps.
     
    stephan2307, Sep 18, 2009 IP
  3. premiumscripts

    premiumscripts Peon

    Messages:
    1,062
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #3
    This has been asked before, please search the forums. You can do this via glob and rand() - a complete solution is in these forums.
     
    premiumscripts, Sep 18, 2009 IP