0

在下面的代码中,CheckBox 没有出现在表格的第一行。任何人都可以帮助我..

rgds,西罗扬

<body>
<form method="post" action="<?php  echo $_SERVER['PHP_SELF'];?>"

<?php
$dbc=mysqli_connect("localhost","root","","elvis_store") or die("Error Connecting to Mysql Database");

$query="SELECT * FROM email_list";
$result=mysqli_query($dbc,$query)or die("Query Syntaxt is Incorrect");

while($row=mysqli_fetch_array($result)){

    echo '<input type="checkbox" value="'.$row['id'].'" name="todelete[]"/>';
    echo $row['first_name']." ".$row['last_name']." ".$row['email'];
    echo "<br/>";
}
mysqli_close($dbc);
?>

<input type="submit" name"submit" value="Remove"/>
</body>
4

1 回答 1

6

您的form标签未在第一行关闭

<form method="post" action="<?php  echo $_SERVER['PHP_SELF'];?>"

它应该是

<form method="post" action="<?php  echo $_SERVER['PHP_SELF'];?>">
于 2012-07-24T04:22:15.380 回答