Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Mar 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Simple Comment Script for Gallery type webpage?

    Hi,

    I have a website where i host my webcomics. Each week i add a new comic and i use php/msql to display and go to the previous and next comics

    What i would like to do is add a div under the area of my comic and have a simple comment script there, so that someone can comment on the comic, go to the next comic and leave different comments for that one. Before i just had a basic chat box.

    Can someone help me out with a very simple comment system? Just name, email, website, comment. I'd like to be able to style the look of the comment system with css.

    Thanks in advance,

    Tara
    Last edited by luminatingsky; 09-09-2009 at 06:18 AM.

  • #2
    Regular Coder Zangeel's Avatar
    Join Date
    Oct 2007
    Location
    public_html/
    Posts
    638
    Thanks
    17
    Thanked 79 Times in 79 Posts
    Create a new table in mysql, with the structure like

    Code:
    CREATE TABLE IF NOT EXISTS `comments` (
    `comment_id` MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
    `name` VARCHAR(60) NOT NULL,
    `email` VARCHAR(60) NOT NULL,
    `body` TEXT NOT NULL
     )
    Then just use MySql insert codes, then to retrieve them, loop them through a mysql_fetch_assoc to display em.

    Basic stuff.

    Make an attempt and post back with what you've got.
    PHP Code:
    $aString is_string((string)array()) ? true false// true :D 
    [/CENTER]


  •  

    Posting Permissions

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