could anybody help me work it out?
site: http://graphic-designz.uni.cc
<? include ('config.php'); $search = $_POST["search"]; $topic = $_POST["topic"]; if (!$search || $search == "Search"){ die ('Please enter a query.'); } if (!$topic){ die('Please choose a method to search by.'); } if ($topic == 'title' || $topic == 'author' || $topic == 'description'){ $sql = "SELECT * FROM search WHERE $topic LIKE '%$search%' ORDER BY program, id DESC"; }else{ $sql = "SELECT * FROM search WHERE (title LIKE '%$search%') AND (program = '$topic') ORDER BY program, id DESC"; } echo "<table align=\"center\"> <tr> <td align=\"center\"><u>Search Info</u>:<br> <font size=\"-2\">:REMOVED FOR LENGTH:</font> </td></tr></table>"; $result = mysql_query("$sql"); if(mysql_num_rows($result) == 0){ echo "No Results to Display."; }else{ $bg = "#2C323B"; echo "<table cellspacing=\"0\">"; while($r=mysql_fetch_array($result)) { if($bg == "#38404B"){ $bg = "#2C323B"; }else{ $bg = "#38404B"; } if($r['program'] == 'photoshop'){ $program = "Photoshop"; }elseif($r['program'] == "image ready"){ :list of program name edits, nothing special: } echo "<tr bgcolor=\"$bg\"><td></td> <td width=\"400\"><a href=\"http://graphic-designz.uni.cc/tut.php?link=$r[link]\" target=\"_blank\"><b>$r[title]</b></a> ::by:: <a href=\"http://graphic-designz.uni.cc/tut.php?link=$r[site]\">$r[author]</a> </td><td> Info-</td></tr> <tr bgcolor=\"$bg\"> <td width=\"60\"><img src=\"$r[img]\" width=\"50\" height=\"50\"> </td> <td><br> $r[description]<hr></td> <td width=\"200\" valign=\"top\"> <font size=\"-2\"><b>Type:</b> $r[program]<br> <b>Date Entered:</b> $r[date]<br> <b>Views:</b> $r[count]</font></td></tr>"; } echo "</table>"; } ?>
it's a 100% working script (go to my site and test it your self), anything surrounded by :: is edited so that i dont have a mile long post, but i would really appreciate some help of any sort