Step 1: Structural formulas
Phthalic acid $\text{C}_6\text{H}_4(\text{COOH})_2$, adipic acid $\text{HOOC(CH}_2)_4\text{COOH}$, glutaric acid $\text{HOOC(CH}_2)_3\text{COOH}$.
Step 2: Salicylic acid
$\text{C}_6\text{H}_4(\text{OH})\text{COOH}$ is the only one with a hydroxyl group.
Step 3: Result
Option (D).
Final Answer:
Salicylic acid has both OH and COOH.
\[ \boxed{\text{(D) }\text{salicylic acid}} \]