In your rent.php file, you have an error that causes a "Fatal error: Call to a member function execute() on boolean" message when you try to submit the form. This error occurs because the $req->prepare() call is returning FALSE instead of a statement object.
Root Cause:
The main issue is that you have a typo in your SQL query: you have written "INSET" instead of "INSERT". This typo causes $req->prepare() to fail and return FALSE instead of a statement object.
Solution:
To fix the error, simply correct the typo in your SQL query:
$req = $conn->prepare('INSERT INTO renter (email, msg_text) VALUES(?, ?)');
Additional Notes:
以上是為什麼我在'rent.php”中收到'致命錯誤:在布林值上呼叫成員函數execute()”?的詳細內容。更多資訊請關注PHP中文網其他相關文章!