This is a discussion on "How to automatically 'add column' to table?" within the Databases section. This forum, and the thread "How to automatically 'add column' to table? are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
How to automatically 'add column' to table?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
How to automatically 'add column' to table?
Hi, I'm working on a web page where users fill in a form (about species).
The form has some basic input fields, radio buttons and an file upload option. But I would also like to give the user an option on adding a NEW text-area him/herself with a subject heading. I´m currently asking for help regarding that option over here. If or when I manage to do that: How will I be able to add those new text areas to the database? Seeing as that I don´t have X number of table column for that information. Would there be a counter for each new text area, and an WHILE function in the PHP code? (While new textarea = add column X to table) I´m terrible at this stuff and seem to have dug my own grave with this project that I have to do. Any help would be great. Thanks Last edited by skuliaxe; Jan 22nd, 2008 at 00:59. |
|
|
|
||||
|
Re: How to automatically 'add column' to table?
The thing about it is you would be giving your user too much control of the database, this is very bad. Can this be done? Yep, quite easily actually, should it be done? No way. What you could do is have them add up to 4 new fields, and have these fields as blank options in your current table. This way they aren't adding to your database, but filling in some optional room you made for them. Also, make sure you have headings for these stored somewhere as well, which you can make an additional field for that.
Hope that helps
Last Blog Entry: Happy Holidays - A Non Offensive way to say Merry Christmas? WRONG! (Dec 11th, 2007)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Adding a column to a table | Jack Franklin | Databases | 2 | Feb 3rd, 2008 08:17 |
| Sorting A Table By Column Header | NewDesigner | Databases | 4 | Dec 8th, 2006 01:53 |
| Automatically updating table | gshaw | Databases | 1 | Jan 19th, 2006 13:21 |
| ..copy data from column A in Table A to column B in Table B? | gecastill | Databases | 10 | Jun 23rd, 2005 18:27 |
| Table Column Headings and Page Breaks | Trebz | Web Page Design | 8 | Jun 4th, 2004 12:55 |