$selected_id = -1;
$selected_name = "";
if(isset($_GET['cid'])){
$cid = $_GET['cid'];
$res = $pdo->prepare("SELECT * FROM k WHERE id = :cid");
$res->bindParam(":cid",$cid);
$result = $res->execute();
$rw = $result->fetchAll([$cid]);
if($rw){
$selected_id = $rw['id'];
$selected_name = $rw['ime'];
}
}
I want to select only ID and compare with already selected ID but always is this error can anybody help me,please...