Add sites in a iframe from mysqli?

hi everyone i wanna make a rotator
that uses the sites url from mysql database
with Previous or Next buttons
how can i do something like this? please

this is what i have try but it redirects sites to much times
so i guess this is not how to do it

i know google yes but google dont help even when you try to
look up every word lol

<iframe src="<?php echo $row['siteurls']; ?>" height="200" width="300"></iframe>

Will the next and previous buttons be links to another page with a different iframe with a different site in it?
Or will you stay on the same page and switch the site in the iframe with the buttons?

yes i will stay on the same page and switch the site in the iframe with sites from database with the buttons

The iframe will need a name attribute. Then you will have anchor links to the site URLs with a target attribute pointing to the iframe’s name.

<iframe name="frame" src="<?php echo $startUrl; ?>" height="200" width="300"></iframe>

<a href="http://www.example.com" target="frame">Next</a>

The problem I foresee is that as the site in the frame changes, the next and previous URLs will need to progress one, the actual html will change without a page refresh, that will require client-side scripting.
To do it all server side, you would not have next/previous, but create a static list of links of the URLs in the page.

the urls in the page i dont want i like them to be loaded from the database ONLY

as there is 300 urls in the database and i like them to be displayed in iframe

there is rotators out there but this i need in mysqli

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.