When it comes to mud on your carpet it's best to act fast. Here's what you need to do:
This should prevent any staining.