Shout Box [LIVE]! Tutorial

This will tell you how I made my shout box [LIVE]! where visitors may talk back and forth and/or post their opinions. You can take this to higher levels but this is just how to get you to understand. This is very simple. First, open Microsoft Access and create this table:

Please note how the Default Value is Now(). Please set msg's field size to 255. Name the table sbl.

 

Now, enter this code into a file named shoutbox.cfm:

<cfquery name="shout" datasource="dsn">
    SELECT *
    FROM sbl
    ORDER BY datedon DESC
</cfquery>

<table cellpadding="2" cellspacing="2" class="box" width="100%">
    <cfoutput query="shout" maxrows="10">
    <tr>
        <td valign=
"top">
        <font size="2" family="Verdana">
           <a href="mailto:#email#" title="#datedon#">#poster#</a>: #msg#
        </font>
        </td>
    </tr>
    <tr>
        <td>

           <hr width="100%">
        </td>
    </tr>

    </cfoutput>
</table>
<hr>
<br>

<form method="post" action="addshout.cfm">
  <font size="2" family="Verdana">
    Name:
    <br>
    <input type="text" name="poster">
    <br>
    E-mail:
    <br>
    <input type="text" name="email">
    <br>
    Message:
    <br>
    <input type="text" maxlength="255" name="msg">
    <br>
    <input type="submit" value="add shout">
</form>

How for addshout.cfm:

<cfinsert datasource="dsn" tablename="sbl">
<cflocation url=
"shoutbox.cfm" addToken="No">

Here is how you place the shout box on your site:

<img src="http://www.xp-resources.com/lev/images/shout_box.gif">
<iframe src="shoutbox.cfm" width="100%" height="300"></iframe>




Questions? Comments?
Please goto http://ww.xp-resources.com for an example of Shout Box [LIVE]!
Or you may e-mail me at admin@xp-resources.com
Thank you for reading my tutorial!

-Drew Tempelmeyer
About This Tutorial
Author: Drew Tempelmeyer
Skill Level: Beginner 
 
 
 
Platforms Tested: CF5
Total Views: 43,682
Submission Date: February 22, 2003
Last Update Date: June 05, 2009
All Tutorials By This Autor: 3
Discuss This Tutorial
  • Thanks, this looks cool, I'll try it out tonight.

  • asdfasfdasdf

  • i cant do it? i made the chart, but where do insert the HTML?

  • far out far out far out far out far out

  • cool

  • cool

Advertisement

Sponsored By...
Powered By...