Author |
Message |
Argon
|
Posted: Sat Apr 01, 2006 11:09 pm Post subject: Allowing users to edit an HTML table ? |
|
|
Allowing users to edit an HTML table ?
I have created a LONG list in an HTML table on my website...is there anyway to allow users to edit the table LIVE (right at the moment) so they can add to the list? The list was done by hand and not php generated if it already had been I could've done a flat file database....but since I didn't think of that I'm sort of stuck any suggestions you can offer? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
rdrake
|
Posted: Sun Apr 02, 2006 1:28 am Post subject: (No subject) |
|
|
The easiest way would be to hold the table data in a database. Have a form at the bottom of the table, allowing the user to add data to the database. The page then refreshes and loads the database information into the table again, with the new data included.
You can use an iframe or AJAX for this, but that's a little bit too much for simple projects. If you really need it to be done without a full refresh, then use those. |
|
|
|
|
|
Tony
|
Posted: Sun Apr 02, 2006 3:55 am Post subject: (No subject) |
|
|
if you need to edit the table live, your best bet is database with AJAX |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
Argon
|
Posted: Sun Apr 02, 2006 8:49 am Post subject: (No subject) |
|
|
that's just the thing....I have the list setup across mulitiple pages...this is going to be a huge job transferring all that data over...cause it's setup like this I have an HTML file named A...and all the ones that start with A go there then another named B and so on....do you know of any program that can easily scan and extract the data ? (or maybe I can make my own there's a thought) |
|
|
|
|
|
Tony
|
Posted: Sun Apr 02, 2006 2:15 pm Post subject: (No subject) |
|
|
Argon wrote: maybe I can make my own
you'd know the best what your data looks like |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
Blade
|
Posted: Sun Apr 02, 2006 9:17 pm Post subject: (No subject) |
|
|
if you chop the file down to just the table, maybe you can read each line of the file using php, then take the significant data and insert it into a mysql table. after you've entered all the data, you can use mysql to get the names that only start with A and display it on the page using a variable passed from the address bar. after you've converted it, its simple to add to the table. make a form, then use the data thats inserted by the user and just insert it to the table. |
|
|
|
|
|
|