dwt 提交给php问题
index.dwt
<form action="index.php?action=act_add_message" method="post"
</form>
--------------------------------------------------------------------------
indwx.php
if($_REQUEST['action'] == 'act_add_message'){
//($_REQUEST['step'] == 'drop_to_collect')
$username = $_POST["username"]; //获取不到 , 是怎么会事?
echo "$username"."<br>"; //打印是空值. $tel = $_POST['tel'];
echo $tel."<br>";
$email = $_POST['email'];
echo $email."<br>";
$ordertype = $_POST['ordertype'];
$postalcode = $_POST['postalcode'];
$addess = $_POST['addess'];
$gustbook = $_POST['gustbook'];
if($username == "" || $tel == ""){
echo "为空!";
}else {
echo $username;
$sql = "insert into ". $ecs->table('ky_order')."(username,tel,ordertype,postalcode,addess,gustbook,email) values ('$username','$tel','$ordertype','$postalcode','$addess','$gustbook','$email')";
echo $sql."<br>";
$db->query($sql);
echo "OK!!!";
}
}