Hi,
I have a search script for my databases and I want it to be able to get a certain picture from a folder on the server that is relevent to its country and type. For example if someone selects germany and news it should gather the germanynews.png pic.
This is my script so far,
<?
mysql_connect("localhost","rttrr","cltrtrd");
mysql_select_db("real") or die("Unable to select database");
$keywords = preg_split("/[\s,]+/", trim($_POST['keyword']));
$sql = "SELECT * FROM items WHERE country='" . mysql_real_escape_string($_POST['menuFilesDMA']) . "' AND type='" . mysql_real_escape_string($_POST['Type']) . "' AND Abstract LIKE '%$keyword%'";
$result = mysql_query($sql);
$num_rows = mysql_num_rows($result);
if($num_rows == 0) {
echo "No results please try a different <a href=asearch.html>search</a>.";
} else {
while($row = mysql_fetch_array($result)) {
echo "<img src=http://www.myroho.com/searchthumbs/$Country$Type.png> <br>"; // <---I want this line to get the picture--->
echo "<b>Name:</b> ".$row['name'] . "<br> ";
echo "<b>Email:</b> ".$row['Email'] . " <br>";
echo "<b>Country:</b> ".$row['Country'] . "<br> ";
echo "<b>Type:</b> ".$row['Type'] . " <br>";
echo "<b>Title:</b> ".$row['Title'] . "<br> ";
echo "<b>Abstract:</b> ".$row['Abstract'] . " <br>";
echo "<b>Article:</b> ".$row['Article'] . " <hr>";
}
}
?>
If any one can help me work out how to do this it would be much appriciated.
Cheers
Colin