使用此处的一些示例中的ISSET对代码上的stackoverflow错误

时间:2015-02-04 18:00:59

标签: php mysql get isset

我不认为我正确编写了代码。有人可以看一下吗?我是php的新手!

<?php 
// Create Connection
$connect = mysqli_connect('localhost','root','test123','joomla');

// Check Connection
if(mysqli_connect_errno($connect)) {
    echo 'Failed to connect to DataBase| '. mysqli_connect_error();
}
?>

我将if(issets($_GET['rp_id']))添加到url参数中不存在的rp_id中 - 它只是关闭数据库

<?php 
if(issets($_GET['rp_id]')) {
    $rp_id = htmlspecialchars($_GET["rp_id"]);
    // open record with evdet_id =$rp_id
    $result = mysqli_query($connect,"SELECT * FROM n0dap_jevents_vevdetail WHERE    evdet_id =".$rp_id);

    while($row = mysqli_fetch_array($result)): 
        $value = $row['google_map'];
        echo $value;
        endwhile;
    }

    $connect->close();
    //if the rp_id does exist the go ahead and run the top otherwise close it.  
} else { 
    $connect->close();
}
?>

1 个答案:

答案 0 :(得分:1)

if(issets($_GET['rp_id]))

看起来你在isset()上打错了。

调用未定义的函数issets()

这意味着您尝试将issets()作为一个函数调用,而不是。 您正在寻找的函数是isset()。如果用isset()替换issets(),则不会再收到该错误消息。