dp926460 2014-11-28 10:11
浏览 31

传递文本字段变量

I want to be able to pass a car registration text field through to a quotation engine. The end URL would be as below.

https://www.thedomain.com/default.aspx?op=getaquote&linkfrom=OMRMOTOR&brand=test&carreg=<?php echo $_SESSION['carreg']; ?>&campaign=<?php echo $_SESSION['campaign']; ?>&clickid=<?php echo $_SESSION['clickid']; ?>

I have created the following form but it doesn't appear to be passing the input of the car reg field, the clickID and campaign are though.

<form method="post" action="https://www.thedomain.com/default.aspx?op=getaquote&linkfrom=OMRMOTOR&brand=test&carreg=<?php echo $_SESSION['carreg']; ?>&campaign=<?php echo $_SESSION['campaign']; ?>&clickid=<?php echo $_SESSION['clickid']; ?>">
<input class="entry" id="carreg" onfocus="if(this.value == 'Your Reg') { this.value = ''; }" value="Your Reg" />
<input type="submit" value="Submit">
</form>
  • 写回答

2条回答 默认 最新

  • duanfeigui6655 2014-11-28 10:20
    关注

    The problem is that the carreg isn't know in the session when that <form-Statement with the URL is bein parsed, because carreg will be entered in the form. So you should submit your form to an "processor" which could read the input and the redirect accordingly using header("location:https//www.thedomain.com/...etc.

    评论

报告相同问题?

悬赏问题

  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值