SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Posts rarely lloydi's Avatar
    Join Date
    Jan 2002
    Swindon UK
    0 Post(s)
    0 Thread(s)

    An off-the-shelf comments package for PHP

    I am thinking of adding comments into an old site of mine - when we were on travels using blog to publish, we had a lot of comments, and I miss them :-(

    The thing is, I'd like to avoid having to build it from scratch and wondered if anyone has a recommendation for a PHP-comments solution that I could pretty much plug in to an include file.

    Naturally I'll need to set up a DB, and ideally I'd like to have captcha in there too.

    But mainly I want it to work and produce clean, accessible markup

    So, if anyone has any suggestions, I'd appreciate them. Otherwise I'll just hand code from scratch as originally planned ...
    Build Your Own Web Site the Right Way!
    A beginners' HTML/CSS book with web standards at its heart
    The Ultimate HTML Reference
    A complete reference, in glorious hardback

  2. #2
    SitePoint Wizard
    Join Date
    Oct 2005
    0 Post(s)
    0 Thread(s)
    Hi lloyd,

    I dont know of any pre-packaged solutions personally but id recommend building it yourself if you know php. It would be very simple.

    Id have a form with name, email, comment fields and have that submit to a script that validates the input and correctly escapes all the user info and then inputs it in to a db table ( id add a timestamp of NOW() also so you can echo that out later).

    Then on the page where you want the comments to appear you can select all the data needed from the db and order it by the date submitted. When you're echoing out the comments you can output them in to whatever markup you want....perhaps a definition list might be semantically most appropriate here?
    Last edited by elduderino; Mar 21, 2007 at 09:09.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts