What i need is a smal PHP Script, what reads from form fields and fill vars in source html.
I will explain you:
Step 1: Template refil
Create Table: TemplateIn
Create Row: ID
Create Row: SourceCode
Create Row: Name
Type = mysql
Create Dropdown and read from DB Templates.
Every Template is filled with Vars.
There are 4 var types:
- {text1:Fieldname} | Creates an text field
- {img1:Fieldname} | Creates an upload Field
- {area1:Fieldname} | Creates an textarea
- {ul1:Fieldname&qty5} | Creates textfields for <ul>
I explain you:
{ text 1 : Text }
Seperaor Field type ID spacer Name & Output Seperator
Now the script read the choosen template and generate auto form below the dropdown.
For example: in choosen Template script found the follow vars:
{text1:Product} Creates a textfield. Label = Product
{text2:Subtitle} Creates a textfield. Label = Subtitle
{img1:ProductImage} Creates a upload field. Lable = ProductImage
{ul1:Types&qty5} Creates a unordered list with 5 points Lable = Types
{area1:Description} Creates a text area. Label = Description
Now User can fill the files.
Below i want
1 Fixed Text Field Label = Name
1 Dropdown Label = Hersteller (read from hersteller)
1 Text Field Label = Neu (write in to hersteller)
1 Drowdown Lable = Lieferant (read from lieferant)
1 Text Field Label = Neu (Write into lieferant)
Create Table hersteller
Create Row ID
Create Row Name
Type = mysql
Create Table lieferant
Create Row ID
Create Row Name
Type = mysql
Below the generated form, we put 4 buttons:
<- Prev | New | Save | Next->
Prev = go to last entry (read from Table Products)
New = reload blank page for new work
Save = writes data from form in Table Products
Next = go to next entry (read from Table Products)
Ask every time on klick:
save your actuylly work? (Yes | No)
Now on Save, Script has to read source template and refil the vars with the data from form.
Now script write ready HTMl Template in a new Table:
Create Table Products
Create Row ID
Create Row Name
Create Row lieferant
Create Row hersteller
create Row html
Type = mysql
Ready with Step 1.
I will later ad 2 functions. So think modular.