:::

3-3 上課範例:ajax.php

<?php
include_once "header.php";

$parent_gsn=empty($_POST['parent_gsn'])?0:$_POST['parent_gsn'];

echo get_cate_options($parent_gsn);


function get_cate_options($parent_gsn){
	global $xoopsDB ;

	$sql = "select `gsn` , `title` from `".$xoopsDB->prefix("contact_cate")."` where `parent_gsn` = '$parent_gsn' order by `sort`";

	$result = $xoopsDB->query($sql) or redirect_header($_SERVER['PHP_SELF'] , 3, mysql_error());

	$main="";
	while(list($gsn , $title)=$xoopsDB->fetchRow($result)){
		$main.="<option value='$gsn'>{$title}</option>";
	}
	return $main;
}
?>

:::

搜尋

QR Code 區塊

https%3A%2F%2Ftad0616.net%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbdsn%3D752%26tbsn%3D26

書籍目錄

展開 | 闔起

線上使用者

59人線上 (21人在瀏覽線上書籍)

會員: 0

訪客: 59

更多…