Hello everyone, I am trying to code an aspect for my site. I, the admin, can post things/news that front-end members can see. When I make a post, I have a drop down select box that lists countries that the post is aimed to (ie. US, FR). What I want to do, is to display the country flag to the front-end members, depending on what country the post is aimed for. For example.... Post is aimed for US --> is displayed to front-end members Post is aimed for France --> is displayed to front-end members File Structure addpost.php -- the form i use to post news to the front-end of the site. Data is sent to database. news.php -- where the post are displayed. Any and all help is greatly appreciated. Thanks, Evan C.
1. Upload icons for countries (e.g. /images/us.gif, /images/fr.gif etc) 2. Edit your news.php When you output post title add img tag: echo "<img src='/images/" . strtolower($db_row['country']) . ".gif' alt='" . strtolower($db_row['country']) . "' > " . stripslashes($db_row['title']);
Thanks for the extremely quick reply. That worked and was exactly what i was looking for! Thanks, ka4ok85!