Merhaba arkadaşlar kendi yaptığım blog scriptinde çoğu şeyi yaptım ancak bir tek sayfalama kaldı. Tema olarak Nurçin'nin yaptığı Rengo temasını kullanacağım sade olduğu için. Aşağıdaki kodlar tema index.php'den while döngüsü içindeki kodlar. Her sayfada 5 yazı göstermek istiyorum.





Aşağıdaki kodlar ise ayar sayfasıdır. Acaba ben sayfalama işini nasıl yapabilirim?
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$colname_blog = "-1";
if (isset($_GET['id'])) {
$colname_blog = $_GET['id'];
}
mysql_select_db($database_ok_kisisel, $ok_kisisel);


$query_blogum = "SELECT * FROM blogum ORDER BY id DESC";
$blogum = mysql_query($query_blogum, $ok_kisisel) or die(mysql_error());
$row_blogum = mysql_fetch_assoc($blogum);
$totalRows_blogum = mysql_num_rows($blogum);

$query_blog = sprintf("SELECT * FROM blogum WHERE id = %s", GetSQLValueString($colname_blog, "int"));
$blog = mysql_query($query_blog, $ok_kisisel) or die(mysql_error());
$row_blog = mysql_fetch_assoc($blog);
$totalRows_blog = mysql_num_rows($blog);

?>