A drop-down list for presenting a list of articles

It is easy to make a drop-down list in an HTML form which gives instant access to the selected article.

If the URLs of the site’s articles are in the form article.php3?id_article=123, the following code will do the trick:

The criteria of the loop can be changed according to your needs. In the example given the articles of the current section will be shown, sorted by title.

This method can be used just as well to present lists of news items or sections. It could even be used to show the complete list of items in the site.

Author Paolo Published : Updated : 26/10/12

Translations : عربي, català, English, Español, français, italiano, Nederlands, svenska, Türkçe, українська