Jump to content

why isnt this working?


seany123

Recommended Posts

<?php
include("lib.php");
define("PAGENAME", "gang Profile");
$player = check_user($secret_key, $db);
//Check for user ID
if (!$_GET['id'])
{
header("Location: gang_listing.php");
}
else
{
//Populates $gang variable
$query3 = $db->execute("select * from `gangs` where `name`=?", array($_GET['id']));
if ($query3->recordcount() == 0)
{
	header("Location: gang_listing.php");
}
else
{
	$gang = $query3->fetchrow();
}
}

include("templates/private_header3.php");

echo "GANG['NAME']: ".$gang['name']."";
echo "GANG->NAME: ".$gang->name."";
echo "GANG->level: ".$gang->level."";
echo "GANG['level']: ".$gang['level']."";

?>

 

im trying to retrieve information from the mysql table gangs.. via the gang name...

 

but for some reason it wont echo anything.

Link to comment
Share on other sites

here is what i get...

 

 

array(23) { ["id"]=> string(1) "9" ["leader"]=> string(9) "adminsean" ["name"]=> string(5) "admin" ["tag"]=> string(3) "ADM" ["motd"]=> string(0) "" ["price"]=> string(2) "20" ["money"]=> string(1) "0" ["points"]=> string(1) "0" ["blurb"]=> string(0) "" ["level"]=> string(1) "1" ["maxlevel"]=> string(3) "500" ["exp"]=> string(1) "0" ["maxexp"]=> string(1) "0" ["maxmoney"]=> string(9) "250000000" ["member_limit"]=> string(1) "5" ["member_limit_max"]=> string(2) "50" ["description"]=> string(10) "WELL HELLO" ["announcement"]=> string(4) "home" ["tax"]=> string(1) "0" ["banner"]=> string(2) "no" ["bannerurl"]=> string(0) "" ["crime"]=> string(1) "0" ["crime_time"]=> string(1) "0" }

 

 

but then i changed users and got this:

 

bool(false)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.