简体   繁体   中英

i cannot get to call the id form the fuctions page it shows that error

function.php

<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);

Its not working it show the following error:

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

$_GET is not a function. It is an array so

Not

$_GET(['pro_id'])

But

$_GET['pro_id']

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM