| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read | ![]() |
|
||||||
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Well, first we will start with the shoutbox, after you have all of the codes up, we will break it up and show you how to customize it Save this as shoutbox.phpShoutbox: Code:
Error: Please enter your nickname.";
}
else if ($message == "") {
echo "Error: No message to be sent.";
}
else if ($mlen > $maxlength) {
echo "Error: Message too long.";
}
else {
$db = mysql_connect($dbhost,$dbuser,$dbpass);
mysql_select_db($dbname) or die(mysql_error());
mysql_query("INSERT INTO shoutbox(name,message,date,ip) VALUES('$name','$message','$date','$ip')");
}
}
$db = mysql_connect($dbhost,$dbuser,$dbpass);
mysql_select_db($dbname) or die(mysql_error());
$query = "SELECT * FROM shoutbox ORDER BY id DESC LIMIT 20";
$result = mysql_query($query);
echo "
Configuration: Code:
SQL query Code:
CREATE TABLE shoutbox ( id INT(10) not null AUTO_INCREMENT, name VARCHAR(20), message TEXT, date VARCHAR(15), ip VARCHAR(15), PRIMARY KEY(id) ); Oh, I almost forgot, put Code:
Customize Now if you look at the begining of you shoutbox.php code, you will see this Code:
----------------------------------------------------------------- -Anish |
![]() |
| Thread Tools | |
| Display Modes | |
|
|