Egypt 's President Hosni Mubarak says he advised the United States not to launch military action against Iran , saying it could trigger violence across the Middle East .