Comment box for personal web site

Discussion in 'HTML & Website Design' started by tommyboy9810, Oct 31, 2010.

  1. #1
    Hello folks -
    I wanna add beautiful comment box to my site alongwith captcha.
    I dunno anything about mysql, please help.

    Thank you.
     
    tommyboy9810, Oct 31, 2010 IP
  2. Nythe

    Nythe Peon

    Messages:
    30
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Well I'm not quite sure about how to integrate the captcha thing, but for a comment box you could just use the <textarea> HTML element. You can format it to look nice by changing its various style parameters via CSS. Detailed information about the textarea element can be found through Google.
    As for actually receiving the comment, you will need to have some server-side script like PHP to which the comments can be sent. For this, you will have to enclose the <textarea> component within a <form>. Once sent to PHP, you can do whatever you want with it, ie, write it to your database, text file, xml file, etc.
    You can Google for this and get much more detailed tutorials explaining this.
     
    Nythe, Oct 31, 2010 IP
  3. tommyboy9810

    tommyboy9810 Peon

    Messages:
    38
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Google has not helped me that much. :(
     
    tommyboy9810, Nov 1, 2010 IP
  4. Nythe

    Nythe Peon

    Messages:
    30
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    If your web host has PHP, try the following:

    in the web page:

    <form action="action.php" enctype="multipart/form-data" method="POST">
    <textarea id="test" name="test" cols="100" rows="5"></textarea>
    </form>

    in action.php

    <?PHP
    $comments = $_POST["test"];
    echo $comments;
    ?>

    This file will simply print out the comments entered to the browser, but if you want to do more, like enter it to a database, you will have to go more in-depth than this. This example just explains how to achieve basic client-server connectivity with HTML and PHP.
     
    Nythe, Nov 2, 2010 IP