Shout Box [LIVE]!

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
All ColdFusion Tutorials By Author: Drew Tempelmeyer
  • Shout Box [LIVE]!
    Ever want a place where people can chat or post their opinions? Ever heard of a shout box? This tutorial will give you an easy example of having a shout box on your site.
    Author: Drew Tempelmeyer
    Views: 29,758
    Posted Date: Saturday, February 22, 2003
  • WHOIS Search
    This will show you how to make a simple WHOIS search that can be easily added to any site.
    Author: Drew Tempelmeyer
    Views: 17,944
    Posted Date: Sunday, April 27, 2003
  • 9 Day Weather Forecast
    This will retrieve the 9 day weather forecast for the specified ZIP code.
    Author: Drew Tempelmeyer
    Views: 27,072
    Posted Date: Friday, May 16, 2003
  • Parsing XML With ColdFusion MX
    Want to know how to parse XML with ColdFusion with ease and very basic concepts? Then this is the tutorial for you.
    Author: Drew Tempelmeyer
    Views: 41,219
    Posted Date: Sunday, November 9, 2003
  • Creating Static HTML Pages from Dynamic Pages
    Static HTML can help reduce the load on the server. This helps resources be used for other things that you may possibly need. Creating static HTML in ColdFusion is a simple task and can simply be done by following this tutorial.
    Author: Drew Tempelmeyer
    Views: 20,677
    Posted Date: Thursday, March 31, 2005
Download the EasyCFM.COM Browser Toolbar!