Changed $_SESSION redid key to 'red_id'