Re: Delete From Array

From: Date: Tue, 04 Feb 2003 06:49:28 +0000
Subject: Re: Delete From Array
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-134216@lists.php.net to get a copy of this message
sorry everyOne.. I have Found the answer.. Problem Solved.., And Topic Canceled.. thanks.. Remon Redika writes:
Hi EveryOne.., I need your help.. I am Using 2 Pages for Deleting rows.. In Page 1 Like This Below. (I am displaying The ID of table ..) and my Page 1 Will Post to Page 2 in Page 2, I've Tried to Deleting Rows.. But I Can't Deleted the Rows... :( PAGE 1 <? include "config.inc"; $mysqllang = "select ID from Penelitian where No=144 or No=785 or No=85 or No=1 or No=755 or No=246 or No=198 or No=239 or No=795 or No=275 or No=560 or No=743 or No=269 or No=715 or No=52 or No=788 or No=313 or No=752 or No=624 or No=205 or No=713 or No=717 or No=276 or No=53 or No=754 or No=277 or No=433"; $result = mysql_query($mysqllang); echo "<form method=\"post\" action=\"page2.php\">"; echo "<table border=0 cellpadding=0 cellspacing=0><tr><td>"; for($x=0;$x<$row=mysql_fetch_array($result);$x++){ echo "<input type=\"text\" name=deleted[$x] value=".$row['ID']."><br>"; } echo "</td>"; echo "<td>"; echo "<input type=\"submit\" value=\"DELETE ALL\">"; echo "</td></tr></table>"; echo "</form>"; mysql_close($conn); ?> PAGE 2 <? include "config.inc"; for ($x=0;$x<27;$x++){ $mysqllang = "Delete From Peneliti where ID=$deleted[$x]<br>"; mysql_query($mysqllang); printf ("Records deleted: %d\n", mysql_affected_rows()); $mysqllang2 = "Delete From Penelitian where ID=$deleted[$x]<br>"; mysql_query($mysqllang2); printf ("Records deleted: %d\n", mysql_affected_rows()); } ?> Need help .., Please.. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general (#134216) next »