HTML表单字符串错误 [英] HTML form string error

查看:289
本文介绍了HTML表单字符串错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我点击发送请求按钮时,查询字符串?req_flag = 0 从URL中消失
我在哪里犯了一个错误?我需要以下URL: localhost / flavourr / send_req.php?req_flag = 0& f_e_mail_add = value

When I click the "Send "Request" button, the query string ?req_flag=0 disappears from the URL. Where am I making a mistake here? I need following URL: localhost/flavourr/send_req.php?req_flag=0&f_e_mail_add=value

<pre>
<form method="get" action="send_req.php?req_flag=0">
                        <input type="text" name="f_e_mail_add" value="Enter email of your friend" onblur='if (this.value == "") {this.value = "Enter email of your friend";}' onfocus='if (this.value == "Enter email of your friend") {this.value = "";}' size="35" />
                        <input type="submit" value="Send Request" />
                            </form></pre>


推荐答案

只需添加如下所示的隐藏值并从action属性中删除'?req_flag = 0'。

Just add a hidden value as shown below and remove the '?req_flag=0' from the action attribute.

<form method="get" action="send_req.php">
    <input type="text" name="f_e_mail_add" value="Enter email of your friend" size="35" />
    <input type="hidden" id="req_flag" name="req_flag" value="0" />
    <input type="submit" value="Send Request" />
</form>

这篇关于HTML表单字符串错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆