Please am building a comment system using php+ajax but it's not working.I just don't know what is wrong.Please need your help.Here is a link to my code.. pastebin.com/b0DPUp0b
I do think you missed out the code to connect to your database, right? IF not then try and comment out your database code and see if you can get the ajax code working without it. And if you need it then just get it from EduHelpHub and you will fine. I hope it will help you, thanks!
I am pleased to see you found a solution for this. You may be interested in some Adobe Illustrator training for creating professional logos and design elements for web and mobile.
Dieses neueste System basiert auf fortschrittlicher Technologie. Ich bin froh, über dieses System und diese Software Bescheid zu wissen. Wir bieten an online slots echtgeld zu überprüfen und eine einfache Methode zur Steuerung ihrer Casinospiele zu erhalten. Ich schätze sie dafür, dass sie dies auf so erstaunliche Weise mit der Öffentlichkeit teilen. Bleiben Sie also auf dem Laufenden und lernen Sie so viel wie möglich, um diese Systeme zu implementieren.
Readership can easily increase by this blog for sharing the amazing and wonderful content with us. They have the best collection of blogs so far for us. If you are a student then you check here essay help and get more new steps in education. All the comments articles and the content they shared on it is worthy and valuable to read and share with others as well. Best of luck to them.
Can I assume you left out the code to connect to the database? Otherwise, where does $dbh get set? If that's not set, just comment out your database code and see if you can get the ajax code working without it.
There's no script reference to jquery here. Recommend pressing F12 in Chrome or Firefox to see any javascript errors.
This:
$('#comment_form').keypress(function(event){
Should be:
$('#post_comment').keypress(function(event){
This:
data : {user_comm : comment},
Either do this above the ajax call:
let comment = $(this).val();
or this in the ajax call:
data: {user_comm : $(this).val()},
Lastly, I don't think you want this:
document.getElementById("display-comment").innerHTML = response +
document.getElementById("display-comment").innerHTML;
It will end up duplicating even the text area. Consider revising. You'll know better once you get something coming back.
Joe Clark
Full-stack developer specializing in healthcare IT
jack kim
Comment
nice article