v2.5.2
Giriş yap

Notice: Trying to access array offset on value of type bool in Hatası

rynxie
455 defa görüntülendi
<?php
		include("ayar.php");

		$adress = $_GET["adress"];
		$veri = $vt->prepare("select * from ls where adress=?");
		$veri->execute(array($adress));

		$row = $veri->fetch(PDO::FETCH_ASSOC);
		echo "<input type='text' value='http://localhost/shortlink/t.php?l=".$row["id"]."'/>";
?>

Notice: Trying to access array offset on value of type bool in C:xampphtdocsshortlinkshortenlinkpage.php on line 9
hatasını alıyorum yardım eder misiniz?

Cevap yaz
Cevaplar (1)
farukdst
1205 gün önce
<?php
		include("ayar.php");

		$adress = $_GET["adress"];
		$veri = $vt->prepare("select * from ls where adress=?");
		$veri->execute(array($adress));
		
		if( $veri->rowCount() ){
		    $row = $veri->fetch(PDO::FETCH_ASSOC);
		    echo "<input type='text' value='http://localhost/shortlink/t.php?l=".$row["id"]."'/>";
		}else{
		     echo 'Etkilenen satır yok';
		     print_r( $veri->errorinfo() );   
		}
?>