(P1,T1) -> to (P2,T2) then what will be the change in enthalpy for ideal gas? I need to prove that it is equal to the integral of $C_pdT$ from $T_1$ to $T_2$.
But should not be the case only when the pressure is constant?
The enthalpy of an ideal gas does not depend on pressure.  It is a function only of temperature.  So $C_pdT$ is always equal to dH for an ideal gas of constant composition.  The subscript p on $C_p$ merely indicates that $C_p$ can be measured directly by determining the heat Q absorbed by the gas in a constant pressure experiment.