How to create a form within a div which updates MySQL and then updates itself to display the submitted data
Posted on 2012-08-24
I have a page (index.php) with two divs the left hand div 'sublist' shows a list of topics, the right hand div 'subentries' is intended to display comments relevant to each topic.
When a topic is clicked on in sublist, subentries is updated using ajax. Subentries content is driven by a file, topic.php
What I don't get is how to create a form in subentries that can be used for adding new comments for a given topic.
If I use a form in topic.php what do I set the action to ? If i set it to index.php it means reloading the whole page, if I set it to topic.php it will display topic.php and nothing else