复制代码 代码如下:
<form name=form1 id=form1 method=post action=2.php>
基本信息1:<input type=text name=base1 />
基本信息2:<input type=text name=base2 />
<input type=submit value="下一步">
</form>
复制代码 代码如下:
<form name=form2 id=form2 method=post action=3.php>
产品名称:<input type=text name=prcname />
产品价格:<input type=text name=price />
产品型号:<input type=text name=prcXH />
<input type=hidden name=base1 value="<?php echo $_REQUEST['base1'] ?>" />
<input type=hidden name=base2 value="<?php echo $_REQUEST['base2'] ?>" />
<input type=submit value=下一步 />
</form>
复制代码 代码如下:
<form name=form3 id=form3 method=post action=4.php>
其他信息1:<input type=text name=other1 />
其他信息2:<input type=text name=other2 />
<input type=hidden name=base1 value=<?php echo $_REQUEST['base1'] ?> />
<input type=hidden name=base2 value=<?php echo $_REQUEST['base2'] ?> />
<input type=hidden name=prcname value=<?php echo $_REQUEST['prcname'] ?> />
<input type=hidden name=price value=<?php echo $_REQUEST['price'] ?> />
<input type=hidden name=prcXH value=<?php echo $_REQUEST['prcXH'] ?> />
<input type=submit value=确定 />
</form>
复制代码 代码如下:
<?php
$base1=$_REQUEST['base1'];
$base2=$_REQUEST['base2'];
$prcname=$_REQUEST['prcname'];
$price=$_REQUEST['price'];
$prcXH=$_REQUEST['prcXH'];
$other1=$_REQUEST['other1'];
$other2=$_REQUEST['other2'];
$sql1="insert into [base_table](base1,base2) values('{$base1}','{$base2}')";
$sql2="insert into [prc_table](prcname,price,prcXH) values('{$prcname}','{$price}','{$prcXH}')";
$sql3="insert into [other_table](other1,other2) values('{$other1}','{$other2}')";
query($sql1);
query($sql2);
query($sql3);
echo "写入完成";
?>
新闻热点
疑难解答