<?php

	include "library.php";

	$cxn = start_code();


			/* get variables */

	$account_id = val( $_SESSION, "account_id" );

	$delete = val( $_GET, "delete" );

	$remembered_id = val( $_GET, "rememberedid" );


			/* start page */

	page_header( "", $cxn );


			/* check parameters */

	crash_if_missing( $account_id, "account_id missing in delete_from_remembered", $cxn );

	crash_if_missing( $delete, "delete missing in delete_from_remembered", $cxn );

	crash_if_missing( $remembered_id, "remembered_id missing in delete_from_remembered", $cxn );


	if ($delete == "no")
		echo black( "Remove from remembered list cancelled<br><br>" );
	else
	{
		$query = "DELETE FROM remembered WHERE account_id = ".$account_id." AND remembered_id = ".$remembered_id;

		$result = run_query( $query, $cxn );

		echo black( "Listing successfully removed from your remembered list<br><br>" );
	}
	
	echo show_link( "Return", "mailboxes.php", "box", "remembered" );
?>

