[英]not reload when click submit button
here is my code: 这是我的代码:
member.php (page) member.php(页面)
<?php
$membertype=$_POST['txtmtn'];
$bookalit=$_POST['txtbal'];
$issueprd=$_POST['txtisp'];
$finegp=$_POST['selectfinegp'];
include '../connection.php';
if(isset($_POST['bttnsave']))
{
$sql="UPDATE member_type SET BookAllotmentLimit='$bookalit', IssueForPeriod='$issueprd',
FineGroupName='$finegp' WHERE MemberTypeName='$membertype'";
$res=mysql_query($sql);
}
?>
<form method="post" action="media.php">
<input type="text" name="txtmtn" id="txt" >
<input type="submit" name="bttncfg" id="button2" value="Create Fine Group" onClick="window.open('fine group.php', 'win1','width=420,height=320')">
when i click 'bttncfg' button a fine group.php will be open but member.php's txtmtn value will lost.. 当我单击“ bttncfg”按钮时,一个很好的group.php将打开,但member.php的txtmtn值将丢失。
尝试这个:
<input type="submit" name="bttncfg" id="button2" value="Create Fine Group" onClick="window.open('fine group.php', 'win1','width=420,height=320'); return false;">
At <input type="submit"....
you need action, where you post the value. 在<input type="submit"....
您需要操作,然后在其中发布值。 It will be the page name where you want to post the value and in that page you will get value by $_POST[' ']
这将是您要发布值的页面名称,在该页面中,您将通过$_POST[' ']
获取值
Change the form action and give it target: 更改表单操作并为其指定目标:
<form method="post" action="fine group.php" target="win1">
This way the form will get posted to the correct page inside new browser window. 这样,表单将被发布到新浏览器窗口内的正确页面。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.