我尝试使用选择选项进行此搜索,以选择哪个站点或所有站点。当我单击所有站点时,它可以工作。当我单击“4shared”时,它可以工作。但是当我点击“putlocker”时,我明白了。查询为空。
我真的不知道我做错了什么
<?php
include"inc/connect.php";
include"inc/functions.php";
error_reporting(0);
if(isset($_GET['s']) && $_GET['s'] != ""){
$s = $_GET['s'];
$w = $_GET['w'];
if($w == 'all'){
$sql = "SELECT * FROM result WHERE (`name` LIKE '%".$s."%') OR (`keywords` LIKE '%".$s."%')";
}else if($w == 'Sockshare'){
$sql = "SELECT * FROM result WHERE website='Sockshare' AND (`name` LIKE '%".$s."%') OR (`keywords` LIKE '%".$s."%')";
}else if($w == 'Putlocker'){
$sql == "SELECT * FROM result WHERE website='Putlocker' AND (`name` LIKE '%".$s."%') OR (`keywords` LIKE '%".$s."%')";
}else if($w == '4shared'){
$sql = "SELECT * FROM result WHERE website='4shared' AND (`name` LIKE '%".$s."%') OR (`keywords` LIKE '%".$s."%')";
}else if($w == 'Rapidshare'){
$sql = "SELECT * FROM result WHERE website='Rapidshare' AND (`name` LIKE '%".$s."%') OR (`keywords` LIKE '%".$s."%')";
}
$query = mysql_query($sql) or die(mysql_error());
$count = mysql_num_rows($query);
if($count > 1){
while($row = mysql_fetch_array($query)){
$name = $row["name"];
$details = $row["details"];
$url = $row["url"];
$results .= '
<div id="stitle">' .$name. '</div>
<div id="details">' .$details. '</div>
<div id="url"><a target="_blank" href="' .$url. '">' .$url. '</a></div>';
}
} else {
$results = 'Nothing found!';
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Findrfile.com - Putlocker Search | Sockshare search | Mediafire Search</title>
<link href='http://fonts.googleapis.com/css?family=Orienta' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="main.css" />
</head>
<body>
<script type="text/javascript" src="js/jquery-1.7.2.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<?php include"header.php"; ?>
<div id="spacer"></div>
<?php include"litsearch.php"; ?>
<div id="nuresults"><span class="blue"><?php echo $count; ?> Results found</span></div>
<div id="spacerx"></div>
<div id="wrapper">
<div id="spacerx"></div>
<div id="content">
<?php echo $results; ?>
<div class="clear"></div>
</div>
<div id="spacerx"></div>
<div id="spacer"></div>
</div>
<?php include"footer.php"; ?>
</body>
</html>