function.php我不能讓調用ID形成fuctions頁它顯示錯誤
<a href = "details.php?pro_id='.$pro_id.'"><button type="button" class="btn btn-primary">View Detail</button> </a>
====================== =====================
details.php
if(isset($_GET(['pro_id'])){
$product_id = $_GET['pro_id'];
$get_pro = "select * from products where product_id='$product_id'";
$run_pro = mysqli_query($con, $get_pro);
它不工作它會顯示以下錯誤:
Fatal error: Cannot use isset() on the result of a function call (you can use "null !== func()" instead) in C:\xampp\htdocs\Raj_Cassette\details.php on line 52
isset()函數的功能是用於測試VARS。 http://php.net/manual/en/function.isset.php –
刪除()。 $ _GET是數組,因此您需要編寫$ _GET ['pro_id'],而不使用大括號 – RJParikh
@JethroHazelhurst請.... htmlspecialchars不是用於轉義查詢的值:/ – nospor