MyBB-Plugins Forums

Full Version: $_GET Function NewPoints Shop
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
Can you help to use $_GET Function?
What i must to edit here:
PHP Code:
function newpoints_shop_get_category($cid 0)
{
    global 
$db$mybb;
    if (!
$cid)
        return 
false;
        
    
$query $db->simple_select('newpoints_shop_categories''*''cid=\''.intval($cid).'\'');
    
$cat $db->fetch_array($query);
        
    return 
$cat;


I want to show the categoriei will request in link.
For example:
http://www.mydomain.com/newpoints.php?action=shop&sy=1 and show the categorie that have id 1

http://www.mydomain.com/newpoints.php?action=shop&sy=2 and show the categorie that have id 2

Can you help me?
You must pass that as an argument to newpoints_shop_get_category
Yes , i know but you can help me?
I'm not understanding your question then. Please re-phrase.
i don't know where i must put/edit this:
PHP Code:
$cid intval($mybb->input['sy']); 
in this:
PHP Code:
function newpoints_shop_get_category($cid 0)
{
    global 
$db$mybb;
    if (!
$cid)
        return 
false;
        
    
$query $db->simple_select('newpoints_shop_categories''*''cid=\''.intval($cid).'\'');
    
$cat $db->fetch_array($query);
        
    return 
$cat;

I recommend you to learn PHP, you don't seem to know what you're doing.