$sql = "SELECT website, url, dropdown, description FROM basic where dropdown = 'Social Media'";
追加単一引用符のようになりますので
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT website, url, dropdown, description FROM basic
WHERE dropdown = Social Media";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
echo "<table><tr><th>Website</th><th>URL</th><th>Dropdown</th><th>Description</th></tr>";
// output data of each row
while($row = $result->fetch_assoc()) {
echo "<tr><td><a href='".$row["website"]."'>".$row["url"]."</a></td>
<td>
<td>" . $row["dropdown"]. "</td><td>" . $row["description"]. "</td>
</tr>";
}
echo "</table>";
} else {
echo "0 results";
}
$conn->close();
?>
は、いくつかの引用符を追加します: 'ドロップダウン=「社会Media'' –
@JohnnyMoppはあなたに感謝します。あなたが見ていることは、常に小さなものです。 – Reed