include("mysql_compat.php");
$db=mysql_connect('localhost', 'root', '');
mysql_select_db("know", $db);
$s='\'';
?>
pour consulter la base
include("mysql_compat.php");
# grab information about current article
$sql = "SELECT * FROM kb where id_art=$id_art;";
$result=mysql_query($sql,$db);
while ($item = mysql_fetch_array($result))
{
$title=$item["title"];
$content=$item["text"];
$date=$item["date"];
printf("
include("mysql_compat.php");
function htmlescape ($input) {
$output = '';
while(1) {
if($input == '')
break;
$ch = substr($input,0,1);
$templen = strlen($input) - 1;
$input = substr($input,1,$templen);
if($ch == "\\xA9") $ch = '©';
if($ch == "\\xA8") $ch = '®';
if($ch == '&') $ch = '&';
if($ch == '"') $ch = '"';
if($ch == '<') $ch = '<';
if($ch == '>') $ch = '>';
#if(ord($ch) > 126) $ch = '';
#if(ord($ch) < 9) $ch = '';
#if(ord($ch) == 11) $ch = '';
#if(ord($ch) > 14 && ord($ch) < 32) $ch = '';
$output = $output . $ch;
}
return($output);
}
/**********************************************************************/
?>