Plz tell me hw i can make smiley list by category, adult,emotions,own smileys etc category
Smiley list by difrent category,how?
Collapse
X
-
add in _smilies a new line : tipe int(1) ... //
PHP Code:$lcateg = 8; //last categ
$categ = (int)$_GET["cat"];
if($categ<1||$categ>$lcateg)$categ = 0; else $categ = $_GET["cat"];
//replace count
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_smilies WHERE tipe='". $categ."'"));
//and replace $sql
$sql = "SELECT id, scode, imgsrc FROM ibwf_smilies WHERE tipe='".$categ."' ORDER BY id DESC LIMIT $limit_start, $items_per_page";
/// and add in links &cat=$categ
//make an action whit links to categ
<a href=\"lists.php?action=smilies&cat=0&sid=$sid\">Diverse Emotions</a><br/>
//
Last edited by i0nutzxp; 27.02.10, 07:28.<?php unlink('World/Europe/Romania.country'); ?>
-
please help
Originally posted by i0nutzxp View Postadd in _smilies a new line : tipe int(1) ... //
PHP Code:$lcateg = 8; //last categ
$categ = (int)$_GET["cat"];
if($categ<1||$categ>$lcateg)$categ = 0; else $categ = $_GET["cat"];
//replace count
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_smilies WHERE tipe='". $categ."'"));
//and replace $sql
$sql = "SELECT id, scode, imgsrc FROM ibwf_smilies WHERE tipe='".$categ."' ORDER BY id DESC LIMIT $limit_start, $items_per_page";
/// and add in links &cat=$categ
//make an action whit links to categ
<a href=\"lists.php?action=smilies&cat=0&sid=$sid\">Diverse Emotions</a><br/>
//
i have put new line in smilies database with categ int 1, where do i put the above code?
Comment
-
its already telling you lol
$lcateg = 8; //last categ
$categ = (int)$_GET["cat"];
if($categ<1||$categ>$lcateg)$categ = 0; else $categ = $_GET["cat"];
//////////////////////////////////////////////////////////////////////////////////
//replace count
//////////////////////////////////////////////////////////////////////////////////
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_smilies WHERE tipe='". $categ."'"));
//////////////////////////////////////////////////////////////////////////////////
//and replace $sql
//////////////////////////////////////////////////////////////////////////////////
$sql = "SELECT id, scode, imgsrc FROM ibwf_smilies WHERE tipe='".$categ."' ORDER BY id DESC LIMIT $limit_start, $items_per_page";
//////////////////////////////////////////////////////////////////////////////////
/// and add in links &cat=$categ
//////////////////////////////////////////////////////////////////////////////////
//make an action whit links to categ
//////////////////////////////////////////////////////////////////////////////////
<a href="lists.php?action=smilies&cat=0&sid=$ sid\">Diverse Emotions</a><br/>
//
;)
Comment
-
its already telling you lol
$lcateg = 8; //last categ
$categ = (int)$_GET["cat"];
if($categ<1||$categ>$lcateg)$categ = 0; else $categ = $_GET["cat"];
//////////////////////////////////////////////////////////////////////////////////
//replace count
//////////////////////////////////////////////////////////////////////////////////
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_smilies WHERE tipe='". $categ."'"));
//////////////////////////////////////////////////////////////////////////////////
//and replace $sql
//////////////////////////////////////////////////////////////////////////////////
$sql = "SELECT id, scode, imgsrc FROM ibwf_smilies WHERE tipe='".$categ."' ORDER BY id DESC LIMIT $limit_start, $items_per_page";
//////////////////////////////////////////////////////////////////////////////////
/// and add in links &cat=$categ
//////////////////////////////////////////////////////////////////////////////////
//make an action whit links to categ
//////////////////////////////////////////////////////////////////////////////////
<a href="lists.php?action=smilies&cat=0&sid=$ sid\">Diverse Emotions</a><br/>
//
;)
Comment
Comment