0
<?php
$con=mysqli_connect("mysql17.000webhost.com","login","pwd","db");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysql_connect_error();
}
$filter = mysqli_query($con,"SELECT * FROM bad_words");
$content = mysqli_fetch_array($filter);
$old_word = $_POST("input");
$old_word = str_ireplace($content['word'], '[foul]', $old_word);
$filtered_word = $old_word;
Print($filtered_word);
mysqli_close($con);
?>
錯誤消息:
Fatal error: Function name must be a string in /home/a7593238/public_html/bad_filter.php on line 13
請幫助。
$ _ POST( 「輸入」)不正確,正確的方法是$ _ POST [ 「輸入」] – bodi0