Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Bidding Directory   High Bandwidth Dedicated Servers   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 01-31-2007, 09:38 PM   #1 (permalink)
Inactive
 
Join Date: 01-19-07
Location: http://www.t4vn.net
Posts: 11
iTrader: 0 / 0%
Latest Blog:
None

t4vn.net is liked by many
Lightbulb PHP Tutorials : Create Simple ShoutBox

Hi,this is simple tutorials to create shoutbox.
Full tutorial you can view here :
http://www.t4vn.net/tutorials/showtu...-ShoutBox.html

Step 1 : Create database with information :
PHP Code:
CREATE TABLE `tagboard` ( 
`
idint(7NOT NULL auto_increment
`
namevarchar(250NOT NULL default ''
`
commentstext NOT NULL
`
datetimestamp(14NOT NULL
PRIMARY KEY (`id`), 
TYPE=MyISAM AUTO_INCREMENT=419 
Step 2 : Create file config.php with content
PHP Code:
<? 
$dbuser
=""//Database Username 
$dbname=""//Database Name 
$dbpass=""// Database Password 
?>
Step 3: Create File tag.php with content :
PHP Code:
<iframe src="view.php" name="tag" width="179" height="130" frameborder=0 marginwidth="0" marginheight="0"></iframe><form method="POST" ACTION="todo.php"
<
input type="text" NAME="name" Value=">"
<
textarea NAME="post" cols="27" rows="3"></textarea
<
br
<
input TYPE="submit" value="Submit"
Step 4: Create file todo.php with content :
PHP Code:
<?php 
if ($name == '' || $post == ''") 

die ("
Please fill all fieldsClick <a HREF=tag.php>here</ato return."); 

include('config.php'); 

$post = preg_replace("
/</","&lt;",$post); 
$post = preg_replace("
/>/","&gt;",$post); 
$post = nl2br($post); 
$comments = "
$post"; 


$c=mysql_connect("
localhost","$dbuser","$dbpass"); 
mysql_select_db($dbname); 
$todo="
INSERT INTO tagboard (id,name,comments,dateVALUES('','$name','$comments',now())"; 
$solution = mysql_query($todo) or die (mysql_error()); 
if ($solution) 

?> 
<meta http-equiv="
refresh" content="0;url=tag.php" > 
<? 
} ?>
Step 5 : Finally,create file view.php with content :
PHP Code:
<?php 
include('config.php'); 

$c=mysql_connect("localhost","$dbuser","$dbpass"); 

mysql_select_db($dbname); 

$todo='SELECT * FROM `tagboard` order by id desc LIMIT 50'
$solution=mysql_query($todo); 
while (
$place mysql_fetch_array($solution)) 

$id=$place["id"]; 
$comments=$place["comments"]; 

?> 
»<b><? echo "$place[name]"?></b><? echo ": $comments<br>" ?> 
<? 
}?>
You're done.
Good luck:
t4vn.net is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 02-02-2007, 12:12 PM   #2 (permalink)
Contributing Member
 
Izzmo's Avatar
 
Join Date: 11-01-03
Location: Kansas City
Posts: 1,066
iTrader: 0 / 0%
Latest Blog:
Troublesome Exhaust

Izzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to behold
Send a message via ICQ to Izzmo Send a message via AIM to Izzmo Send a message via MSN to Izzmo Send a message via Yahoo to Izzmo
Thanks for the tutorial!

I would recommend putting this into a simple zip file and uploading it to v7N Scripts Library
__________________
Izzmo
Coding Guru Extraordinaire
ZeroWeb Hosting & Design - Customizable hosting for every type of user!
Izzmo is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Tutorials : How to create Member List In PHP & MYSQL ? t4vn.net Coding Forum 1 05-12-2007 10:41 AM
Tutorials: Simple Hit Counter t4vn.net Coding Forum 4 01-24-2007 11:42 AM
How do I create this simple effect? I, Brian Graphic Design Forum 8 07-30-2004 03:54 PM
How To A Create Simple Bookmark iKwak Coding Forum 2 07-15-2004 11:16 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 04:45 AM.
© Copyright 2008 V7 Inc