"PHP Fatal error: Cannot use object of type stdClass as array"
Código PHP:
<?PHP
} else {
if($_REQUEST['act'] == 'delete'){
if(!is_numeric($_GET['id'])){ die("El ID del mensaje debe de ser numerico."); }
$result = mysql_query("SELECT recipient FROM messages WHERE id='".$_GET['id']."'");
$row = mysql_fetch_object($result);
if($row["recipient"] == $user->getuserinfo(username)){
("DELETE FROM messages WHERE id='".$security->makesafe($_GET['id'])."'");
} else {
die("Al parecer, este mensaje no te corresponde.");
}
}
if($_POST['sentbox'] || $_GET['box'] == 'sentbox'){
$box = "sentbox";
} else {
$box = "inbox";
}
?>
Código PHP:
$row = mysql_fetch_object($result);