Re: [newbie] Keeping it all in one page?



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
==================

.



Relevant Pages

  • Re: [newbie] Keeping it all in one page?
    ... use the primary key id in the checkbox unless you have ... some other way to protect your page from hackers. ...
    (comp.lang.php)
  • Re: building dynamic list of web from controls
    ... I think I did misunderstand your ... Then, when we retrieve the CheckBox later in postback event, we can check ... adding an additional HIDDEN control into the template to store the identity ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Checkbox & Combo Box help
    ... you will have to add code to EACH checkbox to uncheck other checkboxes. ... After a couple weeks of digging into the help features and having only ... If a client is choosing different upgrade features and has for ...
    (microsoft.public.excel.programming)
  • Re: Show common words in document?
    ... the checkbox for 'Highlight all items found in:', ... examine the other features of Find & Replace while there by clicking the ... Is there a way to export or display the common words in a single word ...
    (microsoft.public.word.docmanagement)
  • Re: Creating tables using DOM
    ... "EvanK" wrote in message ... just click on a row of the table and be able to retrieve the information ... do you want to include a checkbox or click on a ... without even the implied warranty of merchantability ...
    (microsoft.public.scripting.jscript)