Print selected records

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jan_sc
Forum Newbie
Posts: 8
Joined: Wed Aug 01, 2007 3:10 am

Print selected records

Post 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!
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Post 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.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Print selected records

Post 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.
Post Reply