alert(".strlen($searchstring).");"; switch (strlen($searchstring)) { case 13: if ($searchstring[0]=='0') { $searchstring=substr($searchstring, 1); } $searchstring= $searchstring.'%'; break; case 12: break; case 11: $searchstring= $searchstring.'%'; break; default: $searchstring= '%'.$searchstring.'%'; break; } $searchstring = trim($searchstring); include "include/dbconnect.inc"; $result=mysql_query("select * from himcds where labelnumber LIKE '$searchstring'"); $row = mysql_fetch_array($result); if (!empty($row)) { $startpage='cdinfo.php?labelnumber='.$row[labelnumber]; //exit; } else echo ""; if (mysql_num_rows($result)>1){ echo ""; $startpage='search.php?query=labelnumber&query3='.str_replace ('%', '',$searchstring); } mysql_free_result($result); } if (isset($_GET['r'])){ $startpage= str_replace (';', '&', $_GET['r']); } define("_BBCLONE_DIR", "bbclone/"); define("COUNTER", _BBCLONE_DIR."mark_page.php"); if (is_readable(COUNTER)) include_once(COUNTER); if (isset($_GET['cddbid'])){ $cddbid=$_GET['cddbid']; $startpage= "cddbidpid.php?cdid=$cddbid"; } ?> HIM CD DATABASE