duanniesui6391 2011-05-07 21:48
浏览 52

如何使用PHP在URL栏中传递多个变量?

I want to pass more than one variable in the URL bar using PHP, however I want one of the variables to be added onto another existing variable in the URL bar.

For example:
Let's say you have: test.php?u=2 and let's suppose one of the fields is age. Once I click submit I want the URL to look like test.php?u=2&age=22 but on the same page.

How could I do this? Would I have to redirect the user again?

  • 写回答

2条回答 默认 最新

  • dongpaozhi5734 2011-05-07 21:50
    关注

    <form method="get" action="?"> - use this as your form tag. It'll submit to the same page, with all the form values in the querystring, accessible via $_GET.

    评论

报告相同问题?

悬赏问题

  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?