i need to update ADMIN COLUMN with $_SESSION variable. however, it does not seem to be working correctly. why? help me plz...
require("conn.php");
$sql = "select * from pemohon where id='$_GET[id]';";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{
$sn = $_SESSION['SESS_NAME'];
$sql = "update pemohon set admin='$sn',status_key='2' where id='$_GET[id]';";
$result = mysql_query($sql);
header("Location: admin.php?page=non_member_1");
}
}