hi guys...really need a help on my problem with my delete script. the script below is my form script wc contains also the delete script. works fine with php 4.3.3 but it wont work on 4.3.9...any ideas?
<form name="form1" method="post" action="">
<tr>
<td height="30" align="left" valign="top"><table width="100%" height="28" border="0" cellpadding="0" cellspacing="0" class="heading">
<tr>
<td align="left" valign="middle">Property</td>
<td width="90" align="left" valign="middle">Status</td>
<td width="90" align="left" valign="middle">Location:</td>
<td width="90" align="left" valign="middle">District:</td>
<td width="90" align="left" valign="middle">Postcode:</td>
<td width="55" align="left" valign="middle">Checkbox:</td>
</tr>
</table> </td>
</tr>
<tr>
<?php if ($totalRows_rsProperties > 0) {?>
<td align="right" valign="top">
<?php do { ?>
<table width="100%" height="40" border="0" cellpadding="0" cellspacing="0" class="itemMain">
<tr>
<td align="left" valign="middle"><a href="properties_detail.php?id=<?php echo $row_rsProperties['id']; ?>"><?php echo $row_rsProperties['numF']; ?> <?php echo $row_rsProperties['streetF']; ?></a></td>
<td width="90" align="left" valign="middle"><?php echo $row_rsProperties['statF']; ?></td>
<td width="90" align="left" valign="middle"><?php echo $row_rsProperties['locF']; ?></td>
<td width="90" align="left" valign="middle"><?php echo $row_rsProperties['disF']; ?></td>
<td width="90" align="left" valign="middle"><?php echo $row_rsProperties['postF']; ?></td>
<td width="55" align="left" valign="middle"><input type="checkbox" name="checkbox[]" id="checkbox[]" value="<?php echo $row_rsProperties['id']; ?>"></td>
</tr>
</table>
<?php } while ($row_rsProperties = mysql_fetch_assoc($rsProperties)); ?><br>
<input name="delete" type="submit" id="delete" value="Delete">
</td>
<?php } else { ?>
<td class="itemMain">
No Data. </td>
<?php }?>
</tr>
<?php
if($delete){
for($i=0;$i<$totalRows_rsProperties;$i++){
$delID = $checkbox[$i];
$sql = "DELETE FROM property WHERE id='$delID'";
$result = mysql_query($sql);
}
if($result){
$deleteGoTo = "properties.php";
if (isset($_SERVER['QUERY_STRING'])) {
$deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
$deleteGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $deleteGoTo));
}
}
mysql_close();
?>
</form>
hope someone could give me an insight on this to why it works in an older version of php 4.3.3 and not on 4.3.9
thanks! much appreciated to those who will help!