ok..i got settle with it..the problem is i change from
// where UserGroupID = $groupid"); to w
//here UserGroupID = '$groupid'"); ..i put the bracket ' '...in solve..but..i got another prob..
Invalid at the top level of the document. Error processing resource ' http://localhost/aims_mysql/modules.php?name=Asset&op=modload&file=index&func=displaySubGroup&UserGroupID=1'
and this is the code :
function display_UserGroupList(){
/ who can access
1- Super administrator
2- Admin HQ
3- Moderator HQ
/
global $base_file;
list($conn) = pnDBGetConn();
$result = $conn->Execute("select UserGroupID,UserGroupName from tblusergroup where UserGroupID <> -1");
if ($conn->ErrorNo() <> 0) {
echo $conn->ErrorMsg();
error_log("DB Error: " . $conn->ErrorMsg());
}
//include 'header.php';
modHeader("Harta Modal","Senarai Harta Modal");
echo "<table width=\"100%\" class=\"linetable\">\n"
."<tr align=center><td width=\"85%\" class=\"subheader\"><strong>KUMPULAN PENGGUNA</strong></td>"
."<td width=\"15%\" class=\"subheader\"> </td></tr>";
while(!$result->EOF){
list($UserGroupID,$UserGroupName) = $result->fields;
$result->MoveNext();
echo "<tr class=\"normalrow\">"
."<td>$UserGroupName</td>"
."<td><a href=\"$base_file&func=displaySubGroup&UserGroupID=$UserGroupID\">Lihat</a></td>"
."</tr>";
}
echo "</table>";
//include 'footer.php';
modFooter();
$result->Close();
}[/I] // this code is ok...but when i click at "LIHAT"..theres nothing to appear from database. just blank screen.
this the function to display :
function display_UserSubGroupList($UserGroupID){
/ who can access
1- superadmin
2- Admin - HQ
3- Moderator - HQ
4- Admin -Regional HQ
5- Moderator - Regional HQ
/
global $base_file;
list($conn) = pnDBGetConn();
$result = $conn->Execute("select UserSubGroupID,UserSubGroupName,UserSubGroupType from tblusersubgroup where UserSubGroupID= $UserGroupID");
if ($conn->ErrorNo() <> 0) {
echo $conn->ErrorMsg();
error_log("DB Error: " . $conn->ErrorMsg());
}
//include 'header.php';
modHeader("Harta Modal","Senarai Harta Modal");
echo "<b>Kumpulan Pengguna : </b>". getGroup($usergroupid)
."<br><br>"
."<table width=\"100%\" class=\"linetable\">\n"
."<tr >"
."<td width=\"70%\" class=\"subheader\"><strong>Kem/Jab.</strong></td>"
."<td width=\"20%\" class=\"subheader\"><strong>Jenis</strong></td>"
."<td width=\"10%\" class=\"subheader\"> </td></tr>";
while(!$result->EOF){
list($UserSubGroupID,$UserSubGroupName,$UserSubGroupType) = $result->fields;
$result->MoveNext();
echo "<tr class=\"normalrow\">"
."<td>$UserSubGroupName</td>"
."<td>". SubGroupTypeValue($UserSubGroupType) ."</td>"
."<td><a href=\"$base_file&func=displayDepartment&UserSubGroupID=$UserSubGroupID\">Lihat</a></td>"
."</tr>";
}
echo "</table>";
$result->Close();
//include 'footer.php';
modFooter();
}[/I] // when i try change $result = $conn->Execute("select UserSubGroupID,UserSubGroupName,UserSubGroupType from tblusersubgroup where UserSubGroupID= $UserGroupID");
to
$result = $conn->Execute("select UserSubGroupID,UserSubGroupName,UserSubGroupType from tblusersubgroup where UserSubGroupID= 2");
it show the data. so..what is my problem? because the other function is running except this function..all the coding in the same way..am i missing something?
thankss