<?php 
header('Content-Type: text/html; charset=gb2312' );
//根据从客户端获取的用户创建输出
include("conn/conn.php");
	$sqlstr = 'select * from tb_channel where tb_channel_id = 0';		//生成sql语句
	/*执行SQL语句 */
	$rst = $conn -> execute($sqlstr) or die('Error: '.$conn -> errorMsg()) ;
	$fields = array();										//创建一个数组
	$fields['tb_channel_name'] = $_GET[channel_name];						//向数组中添加数据
	$fields['tb_channel_address'] = $_GET[channel_address];						//向数组中添加数据
	$fields['tb_channel_group'] = $_GET[channel_groups];						//向数组中添加数据
	/*添加新数据*/
	$insert = $conn -> getInsertSQL($rst,$fields) or die('update error：'.$conn -> errorMsg());
if($conn -> execute($insert)){
 echo "频道添加成功!";
}
?>
