0

I have 100 records in My DB.
I want to show 10 and then add another field in the record as UPDATE and then show these 10 as printer friendly.

Attachments paymentsheet.jpg 89.51 KB
3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by diafol
0

Very possible!
when user clicks generate button, you collect the checkboxed things and calculate whatever you calculate and dynamically creating a table as pointed in last image

0

I assume you want to be able to select records via a form or list and then press 'Make Report' or similar. This page then appears and you can print it. Correct?

For this you need a payments table with a Primary Key (named payment_id) set as autoincrement.

Your original list for selecting is drawn from a DB. Each record will have a checkbox associated with it. The checkboxes should have values set to the payment id:

<input type="checkbox" id="include_<?php echo $row['payment_id'];?>" name="include[]" value="<?php echo $row['payment_id'];?>" /><label for ="include_<?php echo $row['payment_id'];?>">Include</label>

In your form handler page, you can extract the selected values.

Create an array out of the values (which are all valid payment_id values) and use that in your SELECT query.

This is the syntax:

SELECT "column_name"
FROM payments
WHERE payment_id IN ('value1', 'value2', ...)

This will return all the desired records.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.