Re: [newbie] Keeping it all in one page?
- From: Jerry Stuckle <jstucklex@xxxxxxxxxxxxx>
- Date: Tue, 29 Jan 2008 20:53:29 -0500
Gilles Ganault wrote:
On Tue, 29 Jan 2008 19:23:20 +0000, The Natural Philosopher <a@xxx>
wrote:
Whatever turns you on.
Does Megan Fox code in PHP? ;-)
I now have four sections in index.php organized in a switch() bloc.
I'd like to add the following features:
1. Retrieve the names of the columns from MySQL, and display them at
the top of the table using TH tags
2. Clicking on a colum header sorts the whole table, ASC and DESC
3. On each line, add a checkbox so that the user can delete some or
all records in one go.
http://img101.imageshack.us/img101/9529/phpcrudfh6.jpg
Does someone have so code handy that I could use as basis?
Thank you.
I'd do the sorting in javascript. And adding a checkbox isn't hard at all. But don't just use the primary key id in the checkbox unless you have some other way to protect your page from hackers. It's too easy for a hacker to delete your entire database. Rather, I use an encrypted value for the checkbox field. Still not foolproof, but a lot safer.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.
- Follow-Ups:
- Re: [newbie] Keeping it all in one page?
- From: Gilles Ganault
- Re: [newbie] Keeping it all in one page?
- From: Gilles Ganault
- Re: [newbie] Keeping it all in one page?
- References:
- [newbie] Keeping it all in one page?
- From: Gilles Ganault
- Re: [newbie] Keeping it all in one page?
- From: The Natural Philosopher
- Re: [newbie] Keeping it all in one page?
- From: Gilles Ganault
- [newbie] Keeping it all in one page?
- Prev by Date: Re: [newbie] Keeping it all in one page?
- Next by Date: php file loading performance
- Previous by thread: Re: [newbie] Keeping it all in one page?
- Next by thread: Re: [newbie] Keeping it all in one page?
- Index(es):
Relevant Pages
|