Hey guys I am scripting with PHP and I need to write a web page that has a print page link which when clicked prints out a print friendly page. Thanx in advance.

This can be done using java script.

<a href="whatever.htm" onClick="window.print();return false"><img src="print.gif"></a>

I want to print the page with PHP in cae javascript is disabled on the client's machine. I don't know but I am sure there is a way to do this in PHP.

i dont want to print a full page. I just want to remove header part and footer part of my web page during the print section. Is this possible? If yes, then how? thanks in advance.

Removing the headers and footers can be changed by the user's printer settings. So; I dunno of a code that removes the headers or footers. But as far as printing is concerned, you should use vibhaj's suggestion.