The trip from La-Seyne-sur-Mer to Barcelona looks like it will take about 7 hours, so you're only going to have one day and a very few hours in Barcelona. Then the trip to Cordoba is close to 5 hours on the fastest trains. That's an awful lot of travel time. I'd suggest skipping Barcelona and flying to Madrid or Seville from Marseille, then taking the train to Cordoba. (Actually, I hate mid-trip flights so I'd try to reorganize the itinerary with the short stay in France at the beginning or the end so there'd only be one long slog between France and Spain.)
You can save substantial money on rail fares by buying tickets early, but the very cheapest tickets will be non-refundable. SNCF Connect can sell you a ticket from La-Seyne-sur-Mer to Barcelona. It will be a bus-train-train-train trip (three transfers). Renfe runs the most trains between Barcelona and Cordoba.
Airline tickets are also likely to be cheaper when purchased well in advance; be very careful about luggage size and weight limits and fees. I use skyscanner.net to check intra-European flight schedules. Buy your ticket from the website of the airline operating the flight. It appears service between Marseille and Seville is limited to just a few days a week and offered by RyanAir and Malta Air. There's more service to Madrid but still not a lot of choice, and all flights are operated by Air Nostrum, whatever that is.