Results 1 to 2 of 2

Thread: Change image and text daily

  1. #1
    Join Date
    Nov 2006
    Posts
    116
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default Change image and text daily

    Hi Guys,

    I wish to add this feature to my site, where am image with some description, changes on a daily basis. i have 4 images with description at the moment. Something similar to this site www.elsema.net


    thanks for your help

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    You'd have a few options when make a script like this.
    Your first one is to use PHP and MySQL, this is one I highly suggest. And could be very simple to make. All you'd have to do is make a simple tables:
    | title | description | imageUrl | Date |
    +-----------------------------------+
    | First | First| first.png | 24 |
    -------------------------------------
    As you can tell, I'm not good at making those.
    And then you'd have a simple query:
    Code:
    SELECT * FROM `tableName` WHERE `Date`=$today
    The second way is also suggested, just not that high.
    What you would do is have a page for each day of A moths, so 31 pages. that have the content you like on it. From there you would just include the page, thats the current day.
    For example:
    PHP Code:
    include("includedPages[".date('j')."].php"); 
    So that would include(assuming the date is the 19th:
    PHP Code:
    include("includedPages[19].php"); 
    You can do also almost the same thing with javascript using frames, instead of includes. But I really don't suggest that. Although if you could get it to work with ajax, that'd be cool.
    Jeremy | jfein.net

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •