homepage Welcome to WebmasterWorld Guest from 54.196.168.78
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
post a comment script
looking for a very simple comment script
gandako




msg:3213932
 10:11 pm on Jan 9, 2007 (gmt 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..

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




msg:3213963
 10:44 pm on Jan 9, 2007 (gmt 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...

henry0




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

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




msg:3214155
 2:18 am on Jan 10, 2007 (gmt 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 =)

CDNQuilter




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

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

gandako




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

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

PHP rock i have to say.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved