<?php

	include "library.php";

	$cxn = start_code();

	$cxn_common = db_common_login();


	
			/* get variables */

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

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

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


			/* start page */

	page_header( "", $cxn, $cxn_common );


			/* check parameters */

	crash_if_missing( $id, "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 member_id = ".$id." AND remembered_id = ".$remembered_id;

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

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