PHP is open source scripting language. It\'s widely used to develop web applications.  Home Web Programming PHP Basic Shoutbox

Basic Shoutbox

Browse Pages: 2  > >>

Basic ShoutboxThis tutorial is very similar to the news portal and a basic shoutbox.

Alright, in this case, let's do the php code first. It should like something like below. You are more than welcome to change anything you want as long as you know what you are doing.

<?php
$tag
= ("<font size="2" face="Arial">

<a href="/img_articles/9674/$website">$name: $message
</font>"
);

$file = fopen("tag.php", "r");
$read = fread($file, filesize("tag.php"));
fclose($file);
$invano = fopen("tag.php", "w"); //Leave alone look and learn, only edit if you know
php
$tag
=stripslashes($tag);
fwrite($invano, "$news $read");
fclose ($invano);
print
"<meta http-equiv="refresh" content="0;tag.php">"; //edit path to where the tag.php file falls
?>

Save this file as addtag.php

Now make a new file where it will store all the tags. Name it tags.php and CHMOD to 777.

Okay, we will do the form now and include the tag.php. Make 3 fields like below:

Name:
Website:
Message:

It should looks something like below:

<iframe name="tag" src="/img_articles/9674/tags.php" marginwidth="1" marginheight="0" height="200" width="200" border="0" frameborder="0"></iframe>
<FORM action="addtag.php" method="POST" targer="tag">
Name:<br>
<INPUT TYPE="TEXT" name="name" size="20"><br>
Website:<br>
<INPUT TYPE="text" name="website" size="20" value="http://"><br>
Message:<br>
<TEXTAREA NAME="message" COLS=16 ROWS=2></TEXTAREA><br>
<br>
<INPUT TYPE="Submit" name="submit" value="Tag it!" size="20">
</FORM>

Call this file tag.php. Note that, we have added the iframe to show all the tags.

Now add the following code anywhere in your site to show the tag board <? include "tag.php";?>



Author's URL: Invano.com
Browse Pages: 2  > >>
PHP is open source scripting language. It\'s widely used to develop web applications. More PHP Tutorials: Featured Materials | Fresh Materials | More PHP Tutorials at LearnPHP.org

Reader's comments
comments hhf October 04, 2011 says:
hfhf
Reply
comments Iseng March 26, 2011 says:
tes
Reply
comments ukjuyiku November 05, 2010 says:
kjhkjhkjhkjhkjhkjh
Reply
comments Name July 09, 2010 says:
FDS
Reply
comments hek June 12, 2010 says:
hak
Reply
Add comments to "Basic Shoutbox"

Captcha