dongweicha6077 2013-05-26 18:45
浏览 50

PHP:如何在使用提交按钮将用户引导到另一个页面时将隐藏变量传递到一个页面?

I am looking to get the string variable to go to one page, new user page, while the user is directed to page 8.

</p>
<form method="GET" action="pg8.php">
<! moving variables to text file-->
<input name="input1" type="hidden" <?php echo "value=$i1" ?> >
<input name="submit1" type="hidden" <?php echo "value=$f"?> >
<input name="submit2" type="hidden" <?php echo "value=$t"?> >
<input name="submit3" type="hidden" <?php echo "value=$fa"?> >
<input name="submit4" type="hidden" <?php echo "value=$c"?> >
<input type="submit" name="submituser" value="continue">

<?php $string="$string.{$i1}.{$f}.{$t}.{$fa}.{$c}";?>
<input type="hidden" name="newuser" value=<?php echo "$string" ?> >
</form>
  • 写回答

2条回答 默认 最新

  • dongwei1855 2013-05-26 18:53
    关注

    Use javascript for that. On submit, send data via ajax to first page. Instantly after that refer via window.location=secondpage.php to second page.

    评论

报告相同问题?

悬赏问题

  • ¥15 关于Lammps建模的描述
  • ¥15 #lingo#请问一下为什么会出现以下情况,是因为l第一个值是0的缘故吗?
  • ¥15 设计格雷码同步八进制计数器
  • ¥100 改写matlab程序(关键词-系统对)
  • ¥15 函数信号发生器仿真电路
  • ¥15 Qt的pixmap和image图片加载都导致程序崩溃怎么办
  • ¥15 Kali木马生成问题求解
  • ¥30 求一下解题思路,完全不懂
  • ¥15 C51单片机串口控制JQ6500语音模块
  • ¥30 想给yolo5模型加一个图片识别界面,但是图片还没有检测出来就闪退了