我正在使用以下表单,但是当我按下提交按钮时,它不会导航到其他页面
<form id="form1" name="form1" method="post" action="">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="4" align="right">
</td>
</tr>
<tr>
<td colspan="4">
<?php display_msg(); ?></td>
</tr>
<tr>
<th width="26%" style="padding-left:5px"><a href="?page=<?php echo $page_number; ?>&<?php echo $name; ?>">Name</a></th>
<th width="40%"><a href="?page=<?php echo $page_number; ?>&<?php echo $email; ?>">Email</a></th>
<th width="7%"> </th>
<td colspan="5" align="center" bgcolor="#FFFFFF"><input type="submit" name="delete" value="Delete"></td>
<?php
// Check if delete button active, start this
if($delete){
echo "<meta http-equiv=\"refresh\" content=\"0;URL=del.php\">";
}
?>
答案 0 :(得分:2)
您应该将if($delete){
更改为if(isset($_POST['delete'])){
。
答案 1 :(得分:-1)
<form id="form1" name="form1" method="post" action="">
您尚未在表单中定义操作。