if i have this code
$employee_id = mysql_real_escape_string($_GET['id']);
what should i replace it with
$employee_id = mysql_real_escape_string($_GET['id']);
<?php
global $xoopsDB;
$result= mysql_query("SELECT * FROM ".$xoopsDB->prefix("myunit")." ") or die(mysql_error());
while ($row = mysql_fetch_assoc($result)) {
echo '<option value="' . $row['list_unit'] . '">' . $row['list_unit'] . '</option>';
}
?>
<?php
require_once ("mainfile.php");
include(XOOPS_ROOT_PATH."/header.php");
$meta_keywords = "";
$meta_description = "";
$pagetitle = "";
if(isset($xoTheme) && is_object($xoTheme)) {
$xoTheme->addMeta( 'meta', 'keywords', $meta_keywords);
$xoTheme->addMeta( 'meta', 'description', $meta_description);
} else { // Compatibility for old Xoops versions
$xoopsTpl->assign('xoops_meta_keywords', $meta_keywords);
$xoopsTpl->assign('xoops_meta_description', $meta_description);
}
$xoopsTpl->assign('xoops_pagetitle', $pagetitle);
//this will only work if your theme is using this smarty variables
$xoopsTpl->assign( 'xoops_showlblock', 0); //set to 0 to hide left blocks
$xoopsTpl->assign( 'xoops_showrblock', 0); //set to 0 to hide right blocks
$xoopsTpl->assign( 'xoops_showcblock', 1); //set to 0 to hide center blocks
?>
<?php
// Start Groups Permission
$groups = 0;
if (is_object($xoopsUser))
{
$groups = $xoopsUser->getGroups();
}
else {
$groups = array(XOOPS_GROUP_ANONYMOUS);
}
switch($groups)
{
case (in_array(1, $groups)): //admin
{
echo "Only admin group member can see this";
}
break 1;
case (in_array(3, $groups)): //anonymous
{
echo "guest group";
}
break 1;
case (in_array(5, $groups)): // custom group
{
echo "Only custom group member can see this";
}
break 1;
}
//end Group Permission
?>
<?php
include(XOOPS_ROOT_PATH."/footer.php");
?>
// group
$groups = 0;
if (is_object($xoopsUser))
{
$groups = $xoopsUser->getGroups();
}
else {
$groups = array(XOOPS_GROUP_ANONYMOUS);
}
switch($groups)
{
case (in_array(1, $groups)): //admin
echo "admin group";
break 1;
case (in_array(2, $groups)): //registered
echo "registered group";
break 1;
case (in_array(3, $groups)): //anonymous
echo "guest group";
break 1;
case (in_array(4, $groups)): //customized
echo "custom group";
break 1;
}