これは1秒前に機能していました。何がいけなかったのか一生分からない。
エラー: 警告: mysqli_fetch_array() は、パラメーター 1 が mysqli_result であると想定しています。ブール値は C:\xampp\htdocs\PhpProject1\results.php の 25 行目に指定されています
<!DOCTYPE HTML>
<html>
<head>
<link type="text/css" rel="stylesheet" href="Stylesheet.css"/>
<title>Find Me the Goods</title>
</head>
<body>
<a href="form.php" id="help">Help other people find the goods</a>
<div class="container">
<?php
Error:Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:\xampp\htdocs\PhpProject1\results.php on line 25
require("config.php");
if(isset($_POST['submit'])){
$searchTerm = $_POST['searchTerm'];
}
$result = mysqli_query($dbConn,"SELECT * FROM input WHERE country or region or townCity = '$searchTerm'");
while($row = mysqli_fetch_array($result))
{
echo"<div id=resultsbox>";
echo "<p id='date'>" . $row['theDate'] . "</p>";
echo "<table border='0' id='resultsTable'>";
echo "<tr><td><span>" . $row['townCity'] . "</span></td></tr>";
echo "<tr><td>" . $row['region'] . "</td></tr>";
echo "<tr><td>" . $row['country'] . "</td></tr>";
echo "</table>";
echo "<h1>Public smoking tolerance:" . " " . $row['tolerance'] . "/5</h1>";
echo "<h1>Relevant Laws:</h1><p>" . $row['laws'] . "</p>";
echo "<h1>Where to go to find it:</h1><p>" . $row['whereFind'] . "</p>";
echo "<h1>What to expect to pay:</h1><p>" . $row['price'] . "</p>";
echo "<h1>Addition information:</h1><p>" . $row['information'] . "</p>";
echo"</div>";
}
?>
</div>
</body>
</html>