bsp; case 2:
$diva="name2";
$divb="type2";
$divc="date2";
break;
default:
$diva="name1";
$divb="type1";
$divc="date1";
break;
}
//确定节点,输出$temdata[X]到节点$divX;
echo "document.getElementById('".$diva."').innerHTML='".$temdata[2]."';";
echo "document.getElementById('".$divb."').innerHTML='".$temdata[3]."';";
echo "document.getElementById('".$divc."').innerHTML='".$temdata[5]."';";
}
$diva="name2";
$divb="type2";
$divc="date2";
break;
default:
$diva="name1";
$divb="type1";
$divc="date1";
break;
}
//确定节点,输出$temdata[X]到节点$divX;
echo "document.getElementById('".$diva."').innerHTML='".$temdata[2]."';";
echo "document.getElementById('".$divb."').innerHTML='".$temdata[3]."';";
echo "document.getElementById('".$divc."').innerHTML='".$temdata[5]."';";
}
function OutPutData() //这下面如果改成SQL语句就可以写进数据库
{
echo "输出的数据如下,改成SQL语句然后就可以保存下来";
echo "编号1=".$_POST["name1"]."<br>";
echo "编号2=".$_POST["name2"]."<br>";
echo "名称1=".$_POST["type1"]."<br>";
echo "名称2=".$_POST["type2"]."<br>";
echo "日期1=".$_POST["date1"]."<br>";
echo "日期2=".$_POST["date2"]."<br>";
echo "数量1=".$_POST["num1"]."<br>";
echo "数量2=".$_POST["num2"]."<br>";
echo "<a href="text_input.php">返回</a>";
}
?>