douyan4470 2019-03-15 17:48
浏览 104
已采纳

添加指向自定义表单的链接

Basically what i wanted to achieve here is adding a "?" to the form url.

My current code that is not working:

<form action="'.$config['base_url'].'/whatever/users.php?f=verification">
    <button class="btn btn-success">Verification</button>
</form>

i would love for someone to explain what i did wrong so i can learn from my mistake and also possibly solve the issue to retain a good answer along with me learning to see what i did wrong here.

As far as my testing goes everything else seams to be working, what is happening here is that i get redirected to "/whatever/users.php" instead of "/whatever/users.php?f=verification"

  • 写回答

1条回答 默认 最新

  • doufei2194 2019-03-15 17:52
    关注

    echo the base_url into the form action and add the f parameter and value to the button element. On submit f=verification will be in the POST/GET.

    <form action="<?=$config['base_url']?>/whatever/users.php">
         <button class="btn btn-success" type="submit" name="f" value="verification" >Verification</button>
    </form>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题