为什么我的输出不会更新似乎是问题所在?抱歉,我是 php 新手
Childs Name:<?php
$name= mysql_query("select * from persons ORDER BY name");
echo '<select name="name" id="user" class="textfield1">';
while($res= mysql_fetch_assoc($name))
{
echo '<option value="'.$res['id'].'">';
echo $res['name'];
echo'</option>';
}
echo'</select>';
?>
</div>
<br />
<div style="margin-left: 97px;">information:
<input name="name" type="text" value="" /></div>
<div style="margin-left: 127px; margin-top: 14px;"><input name="" type="submit" value="Update" /></div>
我的桌子
<div class="content" id="registry"><br><br>
<table width="100%">
<tr class="head">
<th>Date of entry</th>
<th>Date of Baptisim</th>
<th>Name of the Child</th>
<th>Birthday</th>
<th>Mother</th>
<th>Father</th>
<th>Mother's Address</th>
<th>Father's Address</th>
<th>Current Address</th>
<th>Ninong/Ninang</th>
<th>Amount Paid</th>
<th>Priest</th>
</tr>
<?php
$sql=mysql_query("select * from persons ORDER BY name");
$i=1;
while($row=mysql_fetch_array($sql))
{
$da=$row['da'];
$entry=$row['entry'];
$name=$row['name'];
$bday=$row['bday'];
$mot=$row['mot'];
$fat=$row['fat'];
$motadd=$row['motadd'];
$fatadd=$row['fatadd'];
$ca=$row['ca'];
$nn=$row['nn'];
$paid=$row['paid'];
$priest=$row['priest'];
if($i%2)
{
?>
<tr id="<?php echo $id; ?>" class="edit_tr">
<?php } else { ?>
<tr id="<?php echo $id; ?>" bgcolor="#f2f2f2" class="edit_tr">
<?php } ?>
<td class="edit_td">
<span class="text"><?php echo $da; ?></span>
</td>
<td>
<span class="text"><?php echo $entry; ?></span>
</td>
<td>
<span class="text"><?php echo $name; ?></span>
</td>
<td>
<span class="text"><?php echo $bday; ?></span>
</td>
<td>
<span class="text"><?php echo $mot; ?></span>
</td>
<td>
<span class="text"><?php echo $fat; ?></span>
</td>
<td>
<span class="text"><?php echo $motadd; ?></span>
</td>
<td>
<span class="text"><?php echo $fatadd; ?></span>
</td>
<td>
<span class="text"><?php echo $ca; ?></span>
</td>
<td>
<span class="text"><?php echo $nn; ?></span>
</td>
<td>
<span class="text"><?php echo $paid; ?></span>
</td>
<td>
<span class="text"><?php echo $priest; ?></span>
</td>
</tr>
<?php
$i++;
}
?>
</table>