Hi,

Red line below generates error "Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource". I have checked sql string too. Thanks

<?php
ob_start(); 
$dbhost = "localhost"; 
$dbuser = "root"; 
$dbpass= ""; 
$dbname = "test"; 
@mysql_connect($dbhost,$dbuser,$dbpass) or die ("No connection."); 
@mysql_select_db($dbname) or die ("No database!"); 

$page = $_SERVER['PHP_SELF']; 
$limit = "2"; 

if(empty($_GET['paged'])) { $paged ="1"; } 
if(!is_numeric($_GET['paged'])) { header("location:$page?paged=1"); } 

$girdi = mysql_query("select * from kullanicilar"); 
$sayi = mysql_num_rows($girdi); 
$kac_tane = $sayi / $limit; 

if($kac_tane%$limit!="0") { $kac_tane++; } 
$son = ($paged-1)*$limit; 

$veri = mysql_query("select * from kullanicilar order by id limit $son, $limit"); 
while($cikart = mysql_fetch_array($veri)) { 
$id = $cikart['id']; 
$isim = $cikart['name']; 
$mesaj = $cikart['surname']; 
echo("$id $isim $mesaj"); 
} 

for($i=1; $i < $kac_tane; $i++) { echo("<a href=$page?paged=$i>[$i]</a>"); } 

ob_end_flush(); 
?>

just put echo before$v and execute that query in your database sql query..
it tells you where will be the error...

$v ="select * from kullanicilar order by id limit $son, $limit";
$veri= mysql_query($v);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.