Chip, You're not going to like this .. on the delete you aren't fetching any rows.
Miles At 09:18 AM 1/14/2002 -0800, [EMAIL PROTECTED] wrote: >I have the following short web page to delete dealer bulletins from a >database. My page lists >all the bulletins in the database - id and subject. There is a text input >field to enter the bulletin >id number and hit the delete button, and the bulletin is deleted. It works >except after the submit >delete I get an error - >--------------------------------- >Warning: Supplied argument is not a valid MySQL result resource in >/usr/local/apache/htdocs/bulletin_delete.php on line 35 >----------------------------------------- >line 35 is the while statement. > >Here is the complete page - >----------------------------------------- > > >Simrad Dealer Bulletins - Delete Screen > > > > >NOTE: This is a permanent and irreversible delete! No second chances here! > >Enter the bulleting ID Number: <? $db = mysql_connect("localhost", "root") >or die ("Can't get the database server"); mysql_select_db("bulletins", >$db) or die ("Can't get the database"); if (isset($submit)): $sql = >"delete from dbulletins where news_id = '$newsid'"; else: $sql = "select >news_id, bulletin_subject from dbulletins"; endif; $result = >mysql_query($sql); while ($row = mysql_fetch_array($result)) { print " >\nDelete entry ".$row["news_id"]."? " .$row["bulletin_subject"]."\n >\n"; } ?> ><bulletin_admin.htm>Back > >---------------------------------------- >-- >Chip Wiegand >Computer Services >Simrad, Inc >www.simrad.com >[EMAIL PROTECTED] > >"There is no reason anyone would want a computer in their home." > --Ken Olson, president, chairman and founder of Digital Equipment >Corporation, 1977 > (They why do I have 7? Somebody help me!) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]