güncelle yaparken hata alıyorum yardım edecek var mı? .

gestamehmet demir

<?php

$baglanti = mysql_connect("localhost","root","") or mysql_error();
mysql_select_db("saydam2",$baglanti) or mysql_error();
$id = @$_GET["id"];


if ($_POST) {

$mahalle =$_POST["mahalle"];
$guncelle =mysql_query(" UPDATE kiralik SET mahalle ='$mahalle', id='$id'");
if ($guncelle) {
echo "<font color='green'> Basariyla Güncellendi! </font>";
header ("Refresh:2; url=listele.php");
} else {
echo" <font color='red'> Bir Sorun olustu :(<br/> </font> ";
}

}else {

//mesaji bul
$bul =mysql_query ("select * from kiralik where id='$id'");
$goster = mysql_fetch_array($bul);
extract($goster);


echo" <form action='' method='post'>
Mahalle
<input name='mahalle' type='text' VALUE='{$mahalle}' />
<input type='submit' value='GUNCELLE' />
</form>
";
}
?>


yukarıdaki kod kısmnda

echo" <font color='red'> Bir Sorun olustu :(<br/> </font> ";


satırında hata alıyorum yardımcı olacak var mı

2012-02-13 23:14:13

Php

önce şu satırın altında echo ile gelen bilgiyi yazdırın

$mahalle =$_POST["mahalle"];

sonra da mysql sorgusundan aşağıdaki satıra mysql_error(); yazıp hata varmı bakın.

Her programcı birgün Php yi tadacaktır
2012-02-15 13:33:56

phpkodlari.com © 2009 Herkes Php öğrenecek
Eglence ve Oyun: Gamikro