PDA

View Full Version : (PHP) A simple shout box for your site



Glory
04-04-10, 09:02 PM
Hey guys im going to show you a simple step by step guide on how to make your own personal shout box feel free to customize the forum however you may like..I just left a default for you.


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

<a href=\"$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 under addtag.php


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


Okay now here comes the form remember to include the tag.php.

Name:
Website:
Message:

It should closely resemble this:

<iframe name="tag" src="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

Now post the code anywhere in your site probably the index to make it appear


<? include "tag.php";?>

Enjoy :D

nocommentte
06-04-10, 11:45 PM
nice +rep

Glory
17-04-10, 02:20 PM
thanks I hope it helped

sockerbeat
26-07-10, 12:05 AM
what means with "CHMOD to 777" ? and should i write something in the "tags.php"?

deathbringer159
26-10-10, 01:31 PM
thanks