Php/css contact form

Hi All,
I need help with my contact form.
I am using dreamweaver and editing CSS template.
I have php form that I have placed and it works(send email and message).
But, It goes to another window to display thank you or error page and user needs to go back.
How to make it display pop up message or how to make it display all in the same window?

as you can see it is my first private project, so please help the poor guy:):crying:

let me know if you need the code.
thanks in advance…