Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

post a comment script

looking for a very simple comment script

10:11 pm on Jan 9, 2007 (gmt 0)

New User

10+ Year Member

joined:Jan 9, 2007
votes: 0

Hi, I am new to PhP world and really loving it..

I have been searching and searching on how to make a very simple comment script that does not need to use mysql database. A comment script that I can add on the buttom of a main page as an option link to post a comment for visitors and will posted it on the same page as soon they hit submit..


"post a comment" then a textarea box will show and visitor can post a simple comment and post it on the same page.

I have found soo many different kind but everysingle one have this fancy smiling face.. with mysql database included for the admin.

Pls help :(

10:44 pm on Jan 9, 2007 (gmt 0)

Junior Member

10+ Year Member

joined:July 18, 2006
votes: 0

Hi, welcome to Webmaster World.

It's perfectly possible to come up with a script that would do this but there's a reason why all the ones you've encountered use MySQL. If you let visitors leave a comment some of them will write things you don't want to have displayed: spam, abuse, whatever.

So you'll want to be able to delete comments you don't like. That means you'll want to be able to pick those out individually. With a text file based solution this'll get to be a real pain, believe me, whereas with a database it's much easier to sort the sheep from the goats. Also, should you choose that comments should only be displayed once you've read them and decided they're OK, with a database you can have a column that says whather you've checked them, or not.

There's no technical reason why you can't do all this with simple text files, but the code would be inflexible, over-complex and hard to maintain compared to a database solution. Since life is short and most hosting offerings include MySQL these days, you are unlikely to come across a ready-made answer to your request.

Of course, if you want a custom-built script and you are prepared to pay for it...

11:20 pm on Jan 9, 2007 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member henry0 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Apr 19, 2003
votes: 5

Hi gandako Welcome to WebmasterWorld!

Don’t forget the other option
Learning the “How to”…
What you need:
A MySQL DB; that’s the easier part, either your host supplies it free or for a fee or it won’t.
Then two options change of host or pay.

Next how to manage the DB: phpMyAdmin will do the trick; back to the first question … if not provided then you should really think about moving.

Next: learn the basic of moving input from a form to a MySQL database via a PHP script.

Next: before letting a user fool around you need to learn the basic of security
And how to verify that your user input is the expected input.

Next: learn how to edit, delete from the DB

Sounds tough? Nope! Many WebmasterWorld PHP/MySQL member-coders have done it and learned from here
Review our library, there are many threads offering the PHP MYSQL from A to Z

Plus when you will start we will be there…
Give it a try

2:18 am on Jan 10, 2007 (gmt 0)

New User

10+ Year Member

joined:Jan 9, 2007
votes: 0

Hello Alfaguru and Henry0, thank you for the response.. I will go ahead and try to play around on the db and to see what it will come out =)
2:57 am on Jan 10, 2007 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 18, 2004
votes: 0

Try using SQLite instead - the set up is a piece of cake and it is embedded in php5!
10:36 pm on Jan 21, 2007 (gmt 0)

New User

10+ Year Member

joined:Jan 9, 2007
votes: 0

Woot I finally found one.. twink it a little bit and it worked!

PHP rock i have to say.