Create $_SESSION variables. Create WriteTaggedImages function