daxguy Posted July 11, 2011 Share Posted July 11, 2011 I have a salary system made using php and html.. in which i calculate the monthly salary of my employees.. as a result i get a table on which the salary are displayed.. all i wanted to know how can i add print button with the table and print that table? is there a good solution for this in php? Quote Link to comment https://forums.phpfreaks.com/topic/241692-printing-a-table/ Share on other sites More sharing options...
Kustom_Vegas Posted July 11, 2011 Share Posted July 11, 2011 perhaps this will help.. http://dynamicdrive.com/dynamicindex9/other1.htm Quote Link to comment https://forums.phpfreaks.com/topic/241692-printing-a-table/#findComment-1241316 Share on other sites More sharing options...
daxguy Posted July 11, 2011 Author Share Posted July 11, 2011 the script on the link you sent me prints the complete webpage all i want is the table to be printed avoiding the stuff like the header, sidebar foot etc.. just the resulting table should be printed Quote Link to comment https://forums.phpfreaks.com/topic/241692-printing-a-table/#findComment-1241347 Share on other sites More sharing options...
premiso Posted July 11, 2011 Share Posted July 11, 2011 Create a script called print.php which takes in the information needed to generate the report. Once you have that, generate just a simple table and then you should be able to have an easy clean version to print. So the print button would just open a new window, which points to your print.php, you could potentially store the information in session and regenerate it that route, or just do a re-query. Quote Link to comment https://forums.phpfreaks.com/topic/241692-printing-a-table/#findComment-1241393 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.