Random URL code

I

iPleb

I'm stuck on with this one ...

I have a blog and have a small section designated to place an image. The
image is actually embeded in an iFrame.

I am trying to find some code that will let me list a selection of urls that
feed the iframe, and then have them chosen randomly on each page load.

Does this make sense?

The page is a drupal blog so uses php

Any ideas?

Thanks

Simon
 
J

Jeff

iPleb said:
I'm stuck on with this one ...

I have a blog and have a small section designated to place an image. The
image is actually embeded in an iFrame.

I am trying to find some code that will let me list a selection of urls that
feed the iframe, and then have them chosen randomly on each page load.

Does this make sense?

Not really.

Assuming you have these URLs stuffed in a database table somewhere.
You can use an "ORDER BY RAND()" clause in your PHP mysql select clause.
This is not very complex work if you have some experience with this.

Jeff
 
R

richard

I'm stuck on with this one ...

I have a blog and have a small section designated to place an image. The
image is actually embeded in an iFrame.

I am trying to find some code that will let me list a selection of urls that
feed the iframe, and then have them chosen randomly on each page load.

Does this make sense?

The page is a drupal blog so uses php

Any ideas?

Thanks

Simon


Look into using "random" as well as "Select case".
Each time the random generate picks a number, select case does the
actual work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top