display comment immediately after submitting the form.

by 9 replies
11
Hello!
I know all the HTML and PHP script to create a comment box, and I know well how the comments, username and email address can be inserted in the mysql database. But, I want to be able to immediately display the comment posted by the user on the same page. Just like I have posted this topic and after clicking "Submit New Thread" it is inserted into the database and now immediately displayed here.
Please help me how can I write the script to do so.
#programming #comment #display #form #immediately #submitting
  • AJAX+JQUERY or JAVASCRIPT to post and update the page dinamically

    Looks like a fair sample of AJAX + JQuery for this.
    http://coding.smashingmagazine.com/2...enting-system/
    • [1] reply
    • Which CMS are you using?
      • [2] replies
  • You can use ajax and innerhtml of the div tag to display content so that it can be viewed immediately after the posting
  • Follow this tutorial, contains basic stuff. This should give you a good start

    Comment system with jQuery, Ajax and PHP.
    • [1] reply
    • Thanks to both of you and all of other members. I have now got the main idea and started work on it. Mohit's suggested link is the best one to learn creating a comment system as a beginner.

Next Topics on Trending Feed

  • 11

    Hello! I know all the HTML and PHP script to create a comment box, and I know well how the comments, username and email address can be inserted in the mysql database. But, I want to be able to immediately display the comment posted by the user on the same page. Just like I have posted this topic and after clicking "Submit New Thread" it is inserted into the database and now immediately displayed here. Please help me how can I write the script to do so.