header('Content-type: application/ms-word'); //การผลเป็นไฟล์ word header('Content-Disposition: attachment; filename="filename.doc"'); header('Content-Type: text/html; charset=tis-620'); echo ""; require_once('db_config.php'); $sql0="select * from $_data where ad_chw='$chw' "; $result0=mysql_query($sql0); $db0=mysql_fetch_array($result0); if ($type!='') { $sql1="select * from card_type where crd_type='$code' "; $result1=mysql_query($sql1); $db1=mysql_fetch_array($result1); $sql="select * from $_data where ad_chw='$chw' and ad_code='$code' order by ad_sport,ad_id"; } else { $sql="select * from $_data where ad_chw='$chw' order by ad_sport,ad_id"; } $result=mysql_query($sql); echo "
ที่ | จังหวัด | ชนิดกีฬา | หน้าที่ | เลข AD | ชื่อ-สกุล | ลายมือชื่อ |
$rw | $db[ad_chw] | $db[ad_sport] | $db[ad_duty] | $db[ad_id] | $db[ad_name] |