Click to See Complete Forum and Search --> : Tick Checkbox & Display Ticked Records on a Different Page


transfield
01-24-2008, 04:45 AM
Hello,
I want to query a MySQL database & display the results on a page. These results will have a checkbox next to each record just like Yahoo Mail. I've already done the coding for that and the code is below. The code is working fine.

Now, the next thing I want to do is to tick a few checkboxes and display only the ticked records on a new page for printing purposes. How do I do this?

Thanks.
<form name="form1" method="POST" action="">
<?php
//connect to the database here

$result = mysql_query("SELECT username FROM users WHERE user_posts = 0
AND username != 'Anonymous' AND user_regdate < $four_months");

while ($row = mysql_fetch_array($result))
{
echo "<input type='checkbox' name='boxes[]' value='{$row
['user_id']}'>" . "&nbsp;" . $row['username'];
echo "<br>";
}
?>
</form>

james64
02-06-2008, 01:19 PM
I'm not sure if it will be much help for you, but I had a similar problem and ran into this: http://javascript.internet.com/forms/confirm-order.html. It allows you to do exactly what you are trying to do. You will just need to modify it to reflect the number of fields you want to output on the next page.

The only problem that I am having with it though is that any record that has an & in it is not being outputted on the new page...

Hope this helps...

annasweb
09-03-2008, 02:50 PM
Transfield,

I am trying to the same thing with definitions. Each definition for a word when queried will show up on a page with a checkbox next to it. The user will select the definition they want by checking the checkbox and the results of all checkboxes will then show up on another page for printing.

Would your script work for this type of situation? Did the javascript link work for your final results page?

Your help is appreciated.

Thanks,
Anna

annasweb
09-27-2008, 01:36 PM
Hi Transfield,

Can you please let me know how you resolved the issue with the checkboxes?

Thanks,
Anna