pc-se7en Posted January 13, 2013 Share Posted January 13, 2013 Merhaba arkadaşlar İnternet üzerinde gördüğüm bir scripti arkadaşımın sitesine kurduk her şey tamam sorunsuz ancak yönetim panelinde sayfa düzenlemek istediğimde şöyle bir hata alıyorum Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource inC:\wamp\www\yonetim\sayfa_duzenle.php on line 10 sayfa_duzenle.php ise şu şekilde ; [spoiler] <?php ob_start(); @session_start(); include('../include/baglan.php'); if(isset($_SESSION['kullan'])) { include('fckeditor/fckeditor.php'); $oku=$_REQUEST["oku"]; $veri=mysql_query("Select sid,baslik,konu,sira,aciklama,anahtarkelime from sayfa where sid='$oku'"); list($sid,$baslik,$konu,$sira,$aciklama,$anahtarkelime)=mysql_fetch_row($veri); ?> <style type="text/css"> <!-- .style1 { color: #000000; font-weight: bold; } --> </style> <form name="form1" method="post" action="main.php?cmd=30&oku=<?php echo $sid;?>"> <input type="hidden" name="id" value="<? $id ?>" /> <table width="475" border="1"> <tr> <td width="61"><strong>Başlık</strong></td> <td width="398"><input name="baslik" type="text" id="baslik" value="<?php echo $baslik ?>" size="35"></td> </tr> <tr> <td width="61"><strong>Sira No</strong></td> <td width="398"><input name="sira" type="text" id="sira" size="35" value="<?php echo $sira ?>" /></td> </tr> <tr> <td><strong>Sayfa Açıklama </strong></td> <td><input name="aciklama" type="text" id="aciklama" value="<?php echo $aciklama ?>" size="35" /></td> </tr> <tr> <td><strong>Anahtar Kelimeler </strong></td> <td><input name="anahtarkelime" type="text" id="anahtarkelime" value="<?php echo $anahtarkelime ?>" size="35" /></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td><strong>Konu</strong></td> <td><?php $oFCKeditor = new FCKeditor('yazi') ; // fckeditorun adi $oFCKeditor->BasePath = "fckeditor/" ; $oFCKeditor->Value = $konu; $oFCKeditor->Width = '542px' ; $oFCKeditor->Height = '420px' ; $oFCKeditor->Create() ; // Boyut ayarlamak istiyorsaniz bunlari create(); den once ekleyin ?></td> </tr> <tr> <td> </td> <td><label> <input type="submit" name="Submit" value="Kaydet" /> </label> </td> </tr> <tr> <td> </td> <td> </td> </tr> </table> </form> <?php } else { header("Refresh:0;url=index.php"); } ?> [/spoiler] Scripti İndirmek İçin : http://rapidshare.com/files/3818333189/Ayyildizdesign-urun.rar acaba sorun nerede? Quote Link to comment Share on other sites More sharing options...
blackman12 Posted January 13, 2013 Share Posted January 13, 2013 Sorgu için bunu :"Select * from sayfa where sid='$oku'" Gelen veriyi arraylara aktarmak için bunu : extract(mysql_fetch_array($veri)); kullanın ;) Quote Link to comment Share on other sites More sharing options...
pc-se7en Posted January 13, 2013 Author Share Posted January 13, 2013 Sorgu için bunu :"Select * from sayfa where sid='$oku'" Gelen veriyi arraylara aktarmak için bunu : extract(mysql_fetch_array($veri)); kullanın ;) Hocam şu anda edit yapamıyorum tam olarak düzenlenmiş şeklini verebilirmisin ? php dosyasının Quote Link to comment Share on other sites More sharing options...
blackman12 Posted January 13, 2013 Share Posted January 13, 2013 veremem. Quote Link to comment Share on other sites More sharing options...
pc-se7en Posted January 14, 2013 Author Share Posted January 14, 2013 Hocam dediğiniz gibi yapıncada bu hatayı veriyor. Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource inC:\wamp\www\yonetim\sayfa_duzenle.php on line 10 Warning: extract() [function.extract]: First argument should be an array in C:\wamp\www\yonetim\sayfa_duzenle.phpon line 10 İsterseniz bir inceleyin ben mi yanlış yapıyorum ? Alakalı PHP dosyası : http://www.mediafire.com/view/?o01838wrujrowup Quote Link to comment Share on other sites More sharing options...
carysma1 Posted January 14, 2013 Share Posted January 14, 2013 mysql_query fonksiyonu false döndürüyor galiba bu sayfaya girdiğinde url e bak sayfa_duzenle.php den sonra ?oku=bişey şeklinde olması lazım örnek: http://localhost/yonetim/sayfa_duzenle.php?oku=12 Quote Link to comment Share on other sites More sharing options...
pc-se7en Posted January 15, 2013 Author Share Posted January 15, 2013 mysql_query fonksiyonu false döndürüyor galiba bu sayfaya girdiğinde url e bak sayfa_duzenle.php den sonra ?oku=bişey şeklinde olması lazım örnek: http://localhost/yonetim/sayfa_duzenle.php?oku=12 Yukarda yazdım hocam C:\wamp\www\yonetim\sayfa_duzenle.php on line 10 veriyor Quote Link to comment Share on other sites More sharing options...
carysma1 Posted January 15, 2013 Share Posted January 15, 2013 benim bahsettiğim farklı web tarayıcınla bu sayfayı açtığında adres çubuğunda görünen url den bahsediyorum Quote Link to comment Share on other sites More sharing options...
pc-se7en Posted January 16, 2013 Author Share Posted January 16, 2013 http://localhost/yonetim/main.php?cmd=29&oku=1 bu şekilde Quote Link to comment Share on other sites More sharing options...
carysma1 Posted January 16, 2013 Share Posted January 16, 2013 Ozaman tabloda 1 id sine sahip kayıt olmayabilir yada sorgu cümlesinde hata olabilir mesela sorguda belirtilen sütun veya tablo isimleri hatalı olabilir vs. bilemiyorum biraz kurcala :) Quote Link to comment Share on other sites More sharing options...
pc-se7en Posted January 17, 2013 Author Share Posted January 17, 2013 Ozaman tabloda 1 id sine sahip kayıt olmayabilir yada sorgu cümlesinde hata olabilir mesela sorguda belirtilen sütun veya tablo isimleri hatalı olabilir vs. bilemiyorum biraz kurcala :) Veritabanı bilgim fazla değil veritabanı dosyasını versem inceleyebilirmisiniz Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.