你好,我有下面的'编辑'图标,当我点击它时,它在同一页面内打开(如lightbox)新窗口(iframe)(不刷新等)。在新打开的iframe中,我有一个带有1个输入的表单。我希望在点击提交时使用该函数(在同一个.php文件中)来检查该值(可能只有数字)是否超过299以重定向到google.com,否则将重定向到雅虎。 COM。 (该网站只是一个例子。) 这里是我的“编辑”图标代码:提交表单时无法运行PHP函数。 PHP/HTML
<div id="login-holder"><a href="#skinid"><img src="icons/edit.png" width="12px" height="12px" /></a></div>
下面是在脚本的底部我#skinid格:
<div class="hidden">
<mark id="message"></mark>
<div id="skinid">
<section class="container">
<div class="form2">
<form action="" method="POST">
<!--<fieldset class="textarea-field">
<textarea title="Message">Message</textarea>
</fieldset>-->
<br>
<fieldset>
<span class="ico user-ico"></span>
<input name="skinid" onkeypress="return isNumberKey(event)" type="text" class="field" value="Enter new Skin ID. (-200$)" title="Enter new Skin ID. (-200$)" />
</fieldset>
<center><input type="submit" class="submit btn blue-btn" value="Update" /></center>
</form>
</div></section>
</div></div>
我与加试:
if (isset($_POST['skinid'])) {
if($_POST['skinid'] > 299) {header("Location:http://google.com");}
else {header("Location:http://yahoo.com");}
return;
}
上面的窗体,它没有工作。
是的,问题出在哪里? – dbf 2013-04-29 19:05:06
我已经用我所尝试过的更新过我的帖子。 – user215584 2013-04-29 19:11:22
@ user215584'它没有工作'!='这是它给出的结果不正确' – raidenace 2013-04-29 19:25:12