The Code is:
Code: Select all
<?php
echo "<center><table cellpadding='5' border='1'>";
echo "<tr>";
if (isset($_GET["pic"]))
{
echo "<td valign='center'>
<img src='".$_GET['pic']."' border='0'></td>";
$connection = mysql_connect($host,$user,$password) #13
or die ("couldn't connect to server");
$db = mysql_select_db($database,$connection) #15
or die ("Couldn't select database");
$thing = mysql_escape_string($_GET['pic']);
$query = "SELECT person,pic FROM pics WHERE pic = '".$thing."'";
$result = mysql_query($query)
or die ("Couldn't execute query.");
$row = mysql_fetch_row($result);
if ($_GET["pic"] == $row[1])
{
echo "<div align='center'>
<table border='1' bgcolor='#999999'><td><a href='show.php?find=".$row[0]."'>
<font color='white' face='Verdana, Arial, Helvetica, sans-serif' size='2'>
Back to ".$row[0]." Section</font></a></td></table></div>";
}
}
else
{
echo "No pics found";
}
echo "</tr><center></table>"; #55
?>