Either
$tbl_name
,
$tID
$sID
is empty and have no value or the value is not valid for SQL statement.
The line
$sql=mysql_query("SELECT sID FROM ".$tbl_name." WHERE sID=.$sID.") or die(mysql_error());
Has to be changed to
$sql=mysql_query("SELECT sID FROM ".$tbl_name." WHERE sID=".$sID) or die(mysql_error());