simple comment box ??
Moderator: General Moderators
simple comment box ??
i want to add a simple comment box on each page with some basic text editing features(optional) which first asks for the name of person so that any visitor can post their comment. And also i don't want to save the comments in Db. they shows immediately after posting (like mostly in blogs).
Thank You.
Thank You.
Re: simple comment box ??
well most blogs use a DB and by most i mean all of them
Re: simple comment box ??
Hello,
There is an alternative by writing to text file, but your getting yourself into more hassle than its worth. If your going to allow your users to store information, store it properly, use a database.
Thanks.
There is an alternative by writing to text file, but your getting yourself into more hassle than its worth. If your going to allow your users to store information, store it properly, use a database.
Thanks.
Re: simple comment box ??
ohk.........
thanks alot for ur concern....
now can u provide d code for that ?
actually i also want basic word editing functions in it (if possible !!!)
thank you again
thanks alot for ur concern....
now can u provide d code for that ?
actually i also want basic word editing functions in it (if possible !!!)
thank you again
Re: simple comment box ??
another alternative would be to allow people to post html. You could then remove certain harmful takes, or do the reverse and allow only certain tags. Also,use a database, you could make a table for each page(not worth it) ,or just put a certain tag on each entry(page name?) so that you can recall them easily
Re: simple comment box ??
Let's go back to the beginning. Do you have an HTML form with an input for the author's name, a textarea for the comment, and a submit button?
Edit: This post was recovered from search engine cache.
Edit: This post was recovered from search engine cache.
Last edited by McInfo on Wed Jun 16, 2010 12:26 pm, edited 1 time in total.
Re: simple comment box ??
ya...
"name"= id of author's name
"msg"= id text area
"comment"= form id
"name"= id of author's name
"msg"= id text area
"comment"= form id
Last edited by nits4u on Sat Jun 27, 2009 10:37 am, edited 1 time in total.
Re: simple comment box ??
would you be able to post the code to allow us to get an idea of what you would like to do?
This can be accomplished with AJAXnits4u wrote:they shows immediately after posting (like mostly in blogs).
Re: simple comment box ??
@ a94060
bro. actually presently its not on my pc.
but i just want a simple comment box on a page(like blogs) and if possible the box also have some basic text editing features.
so that every visitor can post his/her views .
bro. actually presently its not on my pc.
but i just want a simple comment box on a page(like blogs) and if possible the box also have some basic text editing features.
so that every visitor can post his/her views .
Re: simple comment box ??
Alrighty, this can be accomplished by using a form on the page you want to comment on. This can then post to a script to add the comment to a database. You can then use AJAX to call the page again,allowing the new comment to show up.
As for the AJAX code, i dont know
, I am just trying to give you a plan. Hopefully someone more intelligible can write that for you.
As for the AJAX code, i dont know
Re: simple comment box ??
lol..
the same prob is with me...
i wrote the code that enter data in Db. but aftr that ???
i dont know....
Vaise thanks......
the same prob is with me...
i wrote the code that enter data in Db. but aftr that ???
i dont know....
Vaise thanks......
Re: simple comment box ??
Even without AJAX, the comment will appear after the user clicks the submit button.
- A client goes to index.php and sees a form.
- The client enters data in the form and clicks a submit button, which sends a POST request to index.php.
- The server processes the POST data and stores a new record in a database.
- The server loads records from the database. The recently added comment is among the retrieved records.
- The server formats the comments as HTML and sends this formatted HTML in a reply to the client.
- The client sees the list of comments on index.php, including the new comment.
Last edited by McInfo on Wed Jun 16, 2010 12:28 pm, edited 1 time in total.
Re: simple comment box ??
ahh,that is true. I forgot that the page does automatically get refreshed after hitting the submit button.