have linked the order history list on the profile page with the order history order number page through passing the order number through the url and then pulling it out in the function via $_GET,. I also updated the mysql query to filter results by that orderid.