Jump to content

Php De Kayıt Setim Çalışmıyor


Recommended Posts

[php]

<?php
    //kayıt setleri oluşturulacak
    //kdv bilgieri kayıt seti
    $query_Kdv = "SELECT * FROM urun_kdv";
    $rsKdv = mysql_query($query_Kdv);
    $row_rsKdv =mysql_fetch_object($rsKdv);
    $num_row_rsKdv = mysql_num_rows($rsKdv);
    
    
    //kategori bilgiler için kayıt seti
    $query_UrunKategori = "SELECT * FROM urun_kategori";
    $rsUrunKategori = mysql_query($query_UrunKategori);
    $row_rsUrunKategori = mysql_fetch_object($rsUrunKategori);
    $num_row_rsUrunKategori = mysql_num_rows($rsUrunKategori);

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
<html xmlns="http://www.w3.org/1999/xhtml
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<?php
echo" kdv çeşidi sayısı:".$num_row_rsKdv;
echo"<br/>";
echo"ürün kategori syısı".$num_row_rsUrunKategori;

?>


</body>
</html>

[/php]

 

argumant hatası alıyorum kayıt setinde burada : $row_rsKdv =mysql_fetch_object($rsKdv);

Link to comment
Share on other sites

peki sayfanın daha üst satılarına db bağlantı bilgilerini yazdınız mı? ya da db bilgilerini içeren sayfayı include ettiniz mi?

 

ayrıca web kodlarınızı

[php]
...
[/php]

tagları içine alınız. bu seferlik ben düzelttim.

Link to comment
Share on other sites

dreamweaver ile hiç denemedim ama, kodlar sadece bu kadarsa veritabanına bağlanmaz. 

 

[php]

<?php
$dbhost  = "localhost";   
$dbkullanici = "root";  
$dbsifre  = "";
$dbadi = "db_adi"; 
$baglan = mysql_connect($dbhost,$dbkullanici,$dbsifre);
 
if(!$baglan)
   { ('MYSQL Bağlanamıyor..!!');}  
else
   { ('MYSQL bağlantısı kuruldu...'); }

[/php]

 

mysql sorgularından önce bu şekilde veritabanına bağlanmanız gerekir.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...