Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more

Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Web Programming > PHP Development
User Name
Password

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 04-03-2006, 06:37 PM   #1 (permalink)
djcronos
Junior Member
 
Join Date: Feb 2006
Posts: 1
Default Sorting MySQL Results with Ability to delete w/checkboxes

Hi everyone,

I've been searching around the net for over a week now on how to actually get this working, so maybe some of you folks can help me out. This is what I'm trying to do:

I am creating a survey results page that displays all the results that have been submitted via a form I've created. I would like to create a page that displays the results in a table, and be able to sort the data by each of the fields that are in the table. I also want to display a checkbox next to each entry so I can delete useless garbage that people might have submitted (including my own test submissions to make sure the form works). I also want to be able to paginate the results and display 20 results per page.

Here's what I've come up with so far. I googled around and found a script that will display the results in a table and give the option to sort each field. I've also found another tutorial on how to implement the checkboxes, but here's the problem - I don't know where in each of the scripts to combine them for them to work properly. My knowledge of PHP is intermediate, so I'm not a total n00b, but with this project you might as well call me a n00b.

http://codewalkers.com/tutorials/21/2.html is the URL I found that will display the db results and give you the option to organize them via each field.

http://www.phpeasystep.com/mysqlview.php?id=8 is the URL I found that will implement the checkboxes.

I have found a URL to paginate, but I believe I can do that on my own.

Now, my question is, what do I need from the latter URL to throw into the first URL in order for it to work, and where exactly do I place it? Is it even possible to do with the two examples of code I gave? If not, could someone point me in the direction of a tutorial that will give me the results I want?

Thanks to everyone in advance. If there is any more information I can provide to help, please let me know.

Thanks again!
djcronos is offline   Reply With Quote
Sponsored Links
Old 05-06-2006, 06:17 PM   #2 (permalink)
etono
Moderator
 
Join Date: May 2006
Posts: 86
Default Re: Sorting MySQL Results with Ability to delete w/checkboxes

I'm sorry I don't have the time to dig too deep into this one, but you need to add a checkbox column. Each column would contain a checkbox input like:

Code:
<input type="checkbox" name="deletes[]" value="<ROW ID HERE>" />

Then add the delete submit button at the bottom, and just loop through the deletes array deleting each row.

Hope this helps in a small way
etono is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Points Per Thread View: 1.00
Points Per Thread: 11.00
Points Per Reply: 5.00



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare
Dedicated Servers

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 03:34 PM.



LinkBacks Enabled by vBSEO 3.0.0 RC8
Webmaster Forums