Good day. I’m trying to make an online quiz application using php. The idea is that the form will add a text field for the question and four other text fields below it for the answers each with a radio button to determine which one is correct. Then below the form is an add a new question button which would call an ajax post function. The problem is instead of appending to the target div, the php code replaces the contents of the div itself. Is there a way for php to append to the div instead of replace its contents?
Share
PHP is server-side, it can’t do anything in the browser, only deliver content.
To add a div, you use Javascript in the page, e.g.
… I think. I always use jQuery: