I am totally new to PHP...started working on it a week back.

I am looking for a innerHTML equivalent in PHP. I need to create a web page with a "Add row" button which when clicked would add 1 blank row on the screen with "remove" button infront of it. Clicking on "remove" would delete this newly added row.

How this can be done with PHP?

9 Years
Discussion Span
Last Post by Will Gresham

If you want to do this without reloading the page, you will need to look into JavaScript (specifically, AJAX if this is connected to a database)

If you are happy to reload the page, you would need to employ some kind of session or cookies to keep track of rows on the page.

We would need some more information or your source code to know exactly what you are looking for.


No, I dont want to reload the page. The same page should get updated without fetching it again.
Currently I am trying to implement it with InnerHTML in javascript. So, I guess I am on the right track.
Thanks. :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.