php 表单不传递变量?
嘿伙计们,我无法传递变量“配置文件”...这是用 smarty 模板完成的 顺便说一句,
{if $commentpossible == true}
<form name="form1" method="get" action="comment.php?profile=5">
<p>
<label for="comment"></label>
<textarea name="comment" id="comment" cols="45" rows="5" ></textarea>
<br>
<input type="submit" name="Submit" id="Submit" value="Submit">
</p>
</form>
{/if}
基本上这个页面是配置文件?profile=5,我想传递该配置文件...我有“5 手动输入” atm 而不是变量只是太看看它是否会工作...它仍然不会...当提交被击中时,它只会转到 comment.php?comment=&Submit=Submit....(评论为空故意在那里)...我需要更多comment.php?profile=5comment=blablabla 等等
知道可能是什么问题吗?
Hey guys I am not able to pass the variable "profile" through... This is done with smarty templates btw
{if $commentpossible == true}
<form name="form1" method="get" action="comment.php?profile=5">
<p>
<label for="comment"></label>
<textarea name="comment" id="comment" cols="45" rows="5" ></textarea>
<br>
<input type="submit" name="Submit" id="Submit" value="Submit">
</p>
</form>
{/if}
Basically this page is profile?profile=5 and I want to pass that profile through...I have "5 manaully inputed atm rather than a variable just too see if it would work...it still does not....when submit is hit it just goes to comment.php?comment=&Submit=Submit....(comment is blank intentionally there)...I need to be more comment.php?profile=5comment=blablabla etc etc
Any idea on what could be the problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您使用 GET 方法时,将
profile
添加为隐藏字段:Add
profile
as a hidden field when you're using the GET method: