help with BASIC script please

Discussion in 'Programming' started by Solicitors Mortgages, Dec 5, 2006.

  1. #1
    1) I want to put 5 hyperlinks on a page and have them load in a random order everytime someone visits/refreshes

    2) I also want to put 5 images on a different page and have them load randomly too

    (The pages are html can I add in a bit of php script into the page somehow (if so,how?) or does the whole page need to be php?

    any help appreciated.
    James.
     
    Solicitors Mortgages, Dec 5, 2006 IP
  2. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #2
    mad4, Dec 5, 2006 IP
  3. rgchris

    rgchris Peon

    Messages:
    187
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yeah, just make the page PHP and then use the opening - <?php - and closing - ?> - tags where you want to put the PHP code.
     
    rgchris, Dec 5, 2006 IP
  4. Solicitors Mortgages

    Solicitors Mortgages Well-Known Member

    Messages:
    2,217
    Likes Received:
    139
    Best Answers:
    0
    Trophy Points:
    103
    #4
    OK, but I am kinda after "what code should I use" :D

    Primarily I want to display 5 standard affiliate hyperlinked 120x60 images on a page column, and have them appear randomly for each different visitor.
    My php skills are below amateur status :eek:

    James.
     
    Solicitors Mortgages, Dec 5, 2006 IP
  5. rgchris

    rgchris Peon

    Messages:
    187
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Look up arrays and then look up the rand function on php.net. That should be a decent starting point.

    If you have any questions, feel free to PM me.
     
    rgchris, Dec 6, 2006 IP