A
Anonymous
Guest
I have two tables:
`parent`
parentid
parentname
`child`
childid
parentid
childname
childage
This is my initial html
I have two questions here. One is what is the code in adding a childfield link link so that when I click that, another forms will be generated or the code above will become like this after I click the add child filed
Another question is how to insert this into database since this will insert into the `parent` table and multiple row for the `child` table.
Thank you.[/code]
`parent`
parentid
parentname
`child`
childid
parentid
childname
childage
This is my initial html
Code:
<form>
parent name: <input type="text" name="parentname"><br>
children: <input type="text" name="child1"> Age:<input type="text"
name="ageforchild1"> <a href="questionhere.link">Add Child Field</a>
</form>
Code:
<form>
parent name: <input type="text" name="parentname"><br>
children: <input type="text" name="child1"> Age:<input type="text"
name="ageforchild1"><br>
children 2: <input type="text" name="child2"> Age:<input type="text"
name="ageforchild2"> <a href="questionhere.link">Add Child Field</a>
</form>
Thank you.[/code]