【发布时间】:2014-01-07 16:12:32
【问题描述】:
我正在创建一个包含以下详细信息的网站:
- 国家代码
- 手机号码
- 留言
- 提交按钮
如果有用户填写表单并提交,我想将该数据传递给www.example.com/subfolder/example.php,但在提交数据后example.php 会将我重定向到www.example.com/index.html。
所以我的问题是:我可以制作一个表单,以便将用户重定向到我想要的特定位置,而不是当前重定向到www.example.com/index.html
这是我的表单代码,位于http://www.datafilehost.com/d/b68c527d
<form name="forma" method="post" id="myForm" action="www.example.com/subfolder/example.php">
<input type="text" value="+977" id="Countrycodepre" name="Countrycodepre" readonly="readonly">
<textarea wrap="off" autocomplete="off" cols="10" rows="1" type="text" name="country_mobile_number">
<button name="submit" class="button100" id="submit" type="submit">Submit</button>
</form>
【问题讨论】:
-
在您发布一些代码之前,没有人可以提供帮助。我们可以看看表格吗?
-
只需提交到
example.php,在该文件的末尾,在表单被解析并且你已经完成了你所做的任何事情之后,只需在 PHP 中使用header() 调用重定向到index.html -
您是否控制要发布到的页面?
-
这是我的表单:@kdeisz
-
@Jeff 我不控制,但我的朋友控制它。他拒绝给我“example.php”文件的来源,并要求我做这件事
标签: javascript php html forms