php require mysql class php require JsHttpRequest JsHttpRequest php db

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
<?php
require("../mysql.class.php");
require("JsHttpRequest/JsHttpRequest.php");
$db = new MySQL();
if (!$db->Open("bookmarks", "localhost", "root", "")) $db->Kill();
$catId = $_REQUEST['str'];
$names = "";
$values = "";
$db->Query("SELECT `id`, `name` FROM `bk_cat2` WHERE `cat_id`='$catId' ORDER BY `name`");
while (!$db->EndOfSeek()) {
$selName = $db->Row();
$names .= $selName->name.";";
$values .= $selName->id.";";
}
$JsHttpRequest =& new JsHttpRequest("windows-1251");
$GLOBALS['_RESULT'] = array(
"name" => $names,
"value" => $values,
);
?>