Using select boxes to print multiple 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
weblogics
Forum Newbie
Posts: 2
Joined: Tue Oct 28, 2008 11:36 am

Using select boxes to print multiple records??

Post by weblogics »

First of all i'm new here and its now time to post my problem as i have searched the forums like i normally do for my help and there isn't anything that explains or helps me in this instance.

I have an online shop which i have built from the ground up, the shop works like any other shop and processes orders. These orders are then stored in two tables one for the orders and one for the order details. When i login all of the weeks orders are present on the first admin page so i know which orders i need to process, This list consists of all the details from the orders table and then to see the full order i go into a second page to view stock levels, products ordered and delivery information. Once i have done this i have a button at the bottom of the order details page that sends a varible to a page that prints the order receipt so that its printed and put into an envelope and shows the customers address in the clear window.

Now im not sure weather i can do this in PHP or weather it will require some javascript as i am using Javascript to popup a print dialogue when the Print Invoice page is called.

I want to have a select box on each record repeated on the main screen so i can select multiple records and then have one button that i can click at the bottom which prints all records i've selected. This is because the sheire number of orders i am recieving is now warrenting a different method to print invoices and hand them to my packing department.

Any help is apreciated!! how big or how small, any direction would be apreciated on this as i am stuck.

I am not looking for a total script from anyone just some help, im not lazy and will do the work myself im just not sure on how to do this or if it is possible.

Regards

Steve
pointer
Forum Newbie
Posts: 3
Joined: Tue Oct 28, 2008 8:04 am

Re: Using select boxes to print multiple records??

Post by pointer »

as far as I understand you want something like this (sorry my english is poor)

Code: Select all

 
<form name="form" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<input type="checkbox" name="selected[]" value="record1">RECORD1<br>
<input type="checkbox" name="selected[]" value="record2">RECORD2<br>
<input type="checkbox" name="selected[]" value="record3">RECORD3<br>
<input type="submit" name="show" value="show">
</form>
 
<?php 
if(isset($_POST['show']))
{
foreach($_POST['selected'] as $record )
{
echo "$record.<br>";
}
}
 
?>
 
 
 
weblogics
Forum Newbie
Posts: 2
Joined: Tue Oct 28, 2008 11:36 am

Re: Using select boxes to print multiple records??

Post by weblogics »

Hi pointer,

Thank you for yours response, I already have the script i have created to show the records on screen.

At the moment i print records out from my PRINTER and use them as invoices, what i want to do because i have so many orders is have multiple select boxes so i can check all the invoices that i want printed and then click print at the bottom of the page and it will then process all of the selected invoices for print using a print template and script i have written called print.php?oid=12.

Steve
Post Reply