Hi There,

Hope everyone is doing well, I'm busy with developing a page but would like the user to be able to add rows Dynamically with PHP. This row will contain columns Example:

<tr>
    <td rowspan="2" align="center" valign="top">Value A</td>
    <td height="24" align="center" valign="top">Value B</td>
    <td rowspan="2" align="center" valign="top">Value C</td>
    <td rowspan="2" align="center" valign="top">Value D</td>
    <td rowspan="2" align="center" valign="top">Value E</td>
    <td rowspan="2" align="center" valign="top">Value F</td>
</tr>    

But I want the columns to be added dynamically with the valid postable names to get data that was added by user. I hope this is possible

Regards

Recommended Answers

All 4 Replies

You can use js or some of jquery functions [add(), append(), appendTo()] to get such result.

There was a simliar thread that you may want to look at. Examples in the thread on how to add the rows client side. As long as you include the proper attributes when the rows and elements are created, the values will be accessible server side when you post.

http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/467834/auto-calculate

Demo for adding rows dynamically: http://itg.somee.com/dw/dw-467834/

Hi Everyone,

Thanks for the input. JorgeM, thank you for the code was exactly what I wanted.

Cheers

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.