{ background: black url(''http://www.imotion.com.br/imagens/data/media/24/8650falcao.jpg'') fixed top left repeat-x;

sábado, 14 de novembro de 2009


/**************************************
- Script written by Tristan -
**************************************/

$sql_host = "xxxxxxxx";
$sql_login = "xxxxxxxx";
$sql_psswd = "xxxxxxxx";
$sql_base = "xxxxxxxx";
$sql_table = "tbl_comments";

$id = addslashes($_GET["id"]);
$id = htmlentities($id);
$nickname = addslashes($_POST["nickname"]);
$nickname = htmlentities($nickname);
$comment = addslashes($_POST["comment"]);
$comment = htmlentities($comment);
$host = $_SERVER["REMOTE_ADDR"];
$date = date("Y-m-d");
$time = date("H:i");

if ($nickname && $comment && $id)
{ $db = mysql_connect($sql_host, $sql_login, $sql_psswd);
mysql_select_db($sql_base, $db);
$sql = "INSERT INTO $sql_table(id, Number, Comment, Information, RemoteIP) VALUES('', '$id', '$comment', '$nickname ($date @ $time)', '$host')";
mysql_query($sql) or die("MySQL Error.");
mysql_close();
echo "";
}

?>



Comments





$db = mysql_connect($sql_host, $sql_login, $sql_psswd);
mysql_select_db($sql_base, $db);
$sql = "SELECT * FROM $sql_table WHERE Number='$id' ORDER BY id Desc";
$req = mysql_query($sql) or die("MySQL Error.");
$res = mysql_numrows($req);
if($res == 0) { echo "

No comment.
"; }
while($data = mysql_fetch_array($req))
{ echo "


Comment from ".stripslashes($data['Information'])." :

 «".stripslashes($data['Comment'])."»


\n";
}
mysql_close();

?>



















  Nickname [and/or mail]
  Comment






0 comentários:

 

© 2009 | dfg | Por TPV