MyBB-Plugins Forums
$_GET Function NewPoints Shop - Printable Version

+- MyBB-Plugins Forums (http://forums.mybb-plugins.com)
+-- Forum: Archived Forums (http://forums.mybb-plugins.com/Forum-Archived-Forums)
+--- Forum: MyBB 1.6.x (http://forums.mybb-plugins.com/Forum-MyBB-1-6-x)
+---- Forum: NewPoints (http://forums.mybb-plugins.com/Forum-NewPoints)
+---- Thread: $_GET Function NewPoints Shop (/Thread-GET-Function-NewPoints-Shop)



$_GET Function NewPoints Shop - aalleexx89 - 08-08-2012

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?


RE: $_GET Function NewPoints Shop - Diogo Parrinha - 08-09-2012

You must pass that as an argument to newpoints_shop_get_category


RE: $_GET Function NewPoints Shop - aalleexx89 - 08-09-2012

Yes , i know but you can help me?


RE: $_GET Function NewPoints Shop - Diogo Parrinha - 08-09-2012

I'm not understanding your question then. Please re-phrase.


RE: $_GET Function NewPoints Shop - aalleexx89 - 08-10-2012

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;




RE: $_GET Function NewPoints Shop - Diogo Parrinha - 08-11-2012

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