Page 1 of 1

Print selected records

Posted: Wed Sep 05, 2007 4:40 am
by jan_sc
hi all,

i needed help on what would be the method(s) to use if (let's say) i have 10 records displayed on the screen and beside each record there is a checkbox. if any of the checkboxes are checked and submit button is clicked, i need to output these records to a printer. what is the work around?

thanks!

Posted: Wed Sep 05, 2007 4:46 am
by aceconcepts
I've not printed from PHP before but I guess the logic you could use might be like this:

1. On submit create array from you checkboxes

2. Loop array and print values inside.

Re: Print selected records

Posted: Wed Sep 05, 2007 1:15 pm
by califdon
jan_sc wrote:hi all,

i needed help on what would be the method(s) to use if (let's say) i have 10 records displayed on the screen and beside each record there is a checkbox. if any of the checkboxes are checked and submit button is clicked, i need to output these records to a printer. what is the work around?

thanks!
Since PHP executes on a web server, there is no way for someone to click on a button and initiate an action on the client computer. You need to do that in a client-side language, such as Javascript.