FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Shout Box





munkey_boy
Hi, I downloaded a template (ty for helping me find it Blaster) and it has a shout box there in html. How will i get the shoutbox to work

My Site[url/]
mathiaus
You need a shoutbox script Wink
Either download and install one on your account or use the code given by an externally hosted one. search google for both types.

-moved-
ranzon
If you want a shoutbox in mySQL i've made a script..

put this script where you want to have the shouts printed:

Code:
<?php
$username="username";
$password="password";
$database="database";

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM shout ORDER BY id DESC LIMIT 0,5";
$result=mysql_query($query) or die(mysql_error());
$num = mysql_num_rows($result);
mysql_close();
$i=0;
while ($i < $num) {

$name=mysql_result($result,$i,"name");
$weburl=mysql_result($result,$i,"weburl");
$shout=mysql_result($result,$i,"shout");


?>
<hr>
Name: <? print('<a href="$shout">$name</a>');?></a><br>
Shout:<br>
<? print("$shout");?>
<?

$i++;
}

?>


set the form action to the file wich contains this:

Code:
<?
$username="";
$password="";
$database="";

$navn = $_POST['name'];
$web = $_POST['weburl'];
$mail = $_POST['shout'];

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die("error selecting mySQL database.");

$query = "INSERT INTO `gjestebok` (`id`, `name`, `weburl`, `shout`) VALUES ('', '$name', '$weburl', '$shout')";

$result=mysql_query($query);

mysql_close();
?>


in mysql you need these:
id, name, weburl, and shout... (in the database..)
id have to be set to auto_increment (on the extra place) and primary ke..
set name to varchar about 30 in length
weburl to varchar about 50 in length
and set shout to longtext.
Related topics
which freemail you are using?
ShoutBox in Forums!
paintball website
help shoutbox
I Need some good ideas for my home page.
Help me please...frontpage help needed!
Hey I'm a Newbie!
Help , help , help
LOOKING FOR THE SERVICES OF WEBSITE DESIGNERS
Shout Boxes, NO MySQL PLEASE
special shout box required - large amount of fri$$ offered
Shout box
Shout box
I am having a phpBB Forum I need a shout box
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.