|
Posted by Jerry Stuckle on 01/30/08 01:53
Gilles Ganault wrote:
> On Tue, 29 Jan 2008 19:23:20 +0000, The Natural Philosopher <a@b.c>
> 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@attglobal.net
==================
Navigation:
[Reply to this message]
|