The present tense of had a nightmare is have a nightmare.
The third-person singular simple present indicative form of have a nightmare is has a nightmare.
The present participle of have a nightmare is having a nightmare.
The past participle of have a nightmare is had a nightmare.