PHP : try close registration