Making inline comments

Discussion in 'PHP' started by enchance, Sep 19, 2007.

  1. #1
    Would any of you guys know the code to develop an inline commenting system on articles? Like the kind you see in blogs were a user posts a reply and it gets appended at the end of the page like magic. :p
     
    enchance, Sep 19, 2007 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    It's a fairly simple script but implementing it would be totally dependant on where exactly you were trying to set it up.

    Basically you need an html form and a script to process the form. Add the user input to a database field and on the blog page just pull the comments out of the database and sort them by the order they were entered.
     
    jestep, Sep 19, 2007 IP
  3. msaqibansari

    msaqibansari Peon

    Messages:
    84
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i think you should use placeholder for that
     
    msaqibansari, Sep 20, 2007 IP
  4. krt

    krt Well-Known Member

    Messages:
    829
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    120
    #4
    How are your articles, postings, other content etc. stored at the moment?

    Usually, you would create a database table with a key that is associated with the ID of the content item along with fields for comment author, date, the comment itself etc.

    Then it is just a matter of adding a form, validating input and adding a record into the database.

    You could try looking at the code of CMS/blog systems or try and find some tutorials to help.
     
    krt, Sep 20, 2007 IP