manage codes by useinng $_SESSION[] global array in php. Then deletion of unwanted files