1. The doctor said I can't play soccer for a month.

2. The doctor said I couldn't play soccer for a month.

(Are both grammatical? What is the difference between the two sentence? Thank you.)

Both are similar in meaning except that #1 implies that there should be no soccer in the future month, while #2 implies that no soccer-playing was in the past.