I think the issue is with my SQL line, which is
"INSERT INTO Stocks (user_id, symbol, shares) VALUES(?, ?, ?) ON DUPLICATE KEY UPDATE shares = ?", $_SESSION["id"], $symbol, $number, $new_shares
My code takes the money away, but does not insert new rows or update stocks in the stocks database.