I've got a page on my small site that enables customers to produce a custom form, e.g. they are able to edit the title from the input area to ensure that it may hold any value they title it with.
In so doing they've created a brand new table within the database using the title from the input area because the title from the column
In so doing I will finish track of an enormous database, it is possible to different method of carrying this out?
I'm sorry if my question sounds absurd however i am self-trained in MySql.
I'd save the input fields in a single table by having an id connecting to some form. The shape is going to be save in some other table by having an id.
Form: - 1 | Test Input: - 1 | Name - 1 | SomeThing
You could discover the input area by searching in INPUT where formId = $form['id'].
What is the easiest method to allow customers to produce tabels inside your db with php and mysql?
The easiest way is without a doubt: never allow that.
For that this type of vague question I begin to see the only not-so-ugly solution: one XML file per form.
Well, you may create a table "page" that may contain Form id as area. Another table is going to be "form" table, which will have characteristics of form and it is "id"(primary key) will be utilized for "foreign"type in "page" table.
In by doing this, it can save you extra table creation in addition to can identify each form distinctively.
I'd favour a noSQL database for this function, for example MongoDB, but because this is not available, I'd either choose MasterCassims solution or simply make use of a
TEXT area in mySQL to keep serialized representations from the forms.