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
https://forums.phpfreaks.com/topic/168400-why-isnt-this-working/
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)

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.