Welcome to WebmasterWorld Guest from 54.234.63.187

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

post a comment script

looking for a very simple comment script

     

gandako

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

5+ Year Member



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..

example:

"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 :(

alfaguru

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

5+ Year Member



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...

henry0

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

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



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

gandako

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

5+ Year Member



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 =)

CDNQuilter

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

10+ Year Member



Try using SQLite instead - the set up is a piece of cake and it is embedded in php5!
cheers
jean

gandako

10:36 pm on Jan 21, 2007 (gmt 0)

5+ Year Member



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

PHP rock i have to say.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month