I realised when testing my website, that a user that receives a message/comment has to refresh the page before they see any alerts or changes.
In comments.php?do=comment&id=1
shows the post with the id
of 1 for users to comment on.
I use this form to submit a comment, and this is shown by a mysql fetch on the same page to show the content.
<form action="" method="post" >
input name="getcomment" type="text" value="What are your thoughts?"/>
<input value="Comment!" type="submit"/>
</form>
I have seen quite a few resources online on updating the content automatically when a new comment has been submitted (for the recipient) but I am not sure which is best. Bearing in mind this is a very small scale website.
What could be my options? (JQuery/Ajax seems the simplest) But is 'polling' the database inefficient?
How would I implement this (which I am finding most difficult)