我想要利用input按钮,在连续页面里传递数值。
比如index.php里有一个文本框,可以填入任意文字。
<form action="index1.php" method="post">
<input type="text" value="什么东东" name="name1" />
<input type="submit" value="确定"/>
</form>index1.php里接受到index.php数值,并有按钮,可以发送到index2.php;
index2.php里接受到index1.php数值,并有按钮,可以发送到index3.php;
index3.php里接受到index2.php数值,并有按钮,可以发送到index4.php... ...我在index1.php里使用
<input name="name2" type="button" value="<?php ''.$_POST["name1"].''; ?>" onclick="window.open('index2.php')" />但是index2.php里使用<?php ''.$_POST["name2"].''; ?>,接受不到index1.php里传过来的变量,是不是input button的代码写的不对?index1.php里我想要的按钮效果是:上面的文字显示为"确定",target="_blank",传递$_POST["name1"]的值到index2.phpPS:网上说要做到target="_blank",就要在input外面加一个form,在form上加target="_blank",是这样的吗?
另外index2.php,index3.php里只要复制index1.php里的代码,是不是就可以无限量的传递数值了?(数值不丢失)
谢谢。
比如index.php里有一个文本框,可以填入任意文字。
<form action="index1.php" method="post">
<input type="text" value="什么东东" name="name1" />
<input type="submit" value="确定"/>
</form>index1.php里接受到index.php数值,并有按钮,可以发送到index2.php;
index2.php里接受到index1.php数值,并有按钮,可以发送到index3.php;
index3.php里接受到index2.php数值,并有按钮,可以发送到index4.php... ...我在index1.php里使用
<input name="name2" type="button" value="<?php ''.$_POST["name1"].''; ?>" onclick="window.open('index2.php')" />但是index2.php里使用<?php ''.$_POST["name2"].''; ?>,接受不到index1.php里传过来的变量,是不是input button的代码写的不对?index1.php里我想要的按钮效果是:上面的文字显示为"确定",target="_blank",传递$_POST["name1"]的值到index2.phpPS:网上说要做到target="_blank",就要在input外面加一个form,在form上加target="_blank",是这样的吗?
另外index2.php,index3.php里只要复制index1.php里的代码,是不是就可以无限量的传递数值了?(数值不丢失)
谢谢。
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<script type="text/javascript" language="javascript">
</script>
</HEAD>
<BODY>
<form method="post" action="b.php">
<input type="text" name="11" id="11">
<input type="submit" value="tijiao">
</form>
</BODY>
</HTML>b.php<html><head>
</head>
<body>
<form action="c.php" method="post">
<input type="hidden" id="22" name="22" value="<?php echo $_POST['11'];?>">
<input type="submit" value="tijiao">
</body>
</html>c.php<?php
echo $_POST['22'];?>
“贾君鹏,你妈妈喊你回家吃饭啦”
……
一直可以传到N页面以外。