Hi there, I've been struggling with this & the mysql documentation doesn't seem to be helping much. I'll try to make this as short as possible...
I have a phone directory that allows a user to search the database by name & the results.php page has two forms in it. one form allows the user to modify the entry & submit changes to the database - this works fine. the other form allows the user to delete the entry (row) from the database - not working. This is basically my code for the results.php page: while ($row = mysql_fetch_array($result)) { $searchterm = "$realname"; echo "<table>"; echo "<form name=modify method=post action=\"save_changes.php\">"; echo "<tr><td><b><font face=arial size=2>Name</font></b></td>"; echo "<td><input type=text size=25 name=realname value=\"$row[realname]\"></td></tr>"; echo "<tr><td><b><font face=arial size=2>Office Phone</font></b></td>"; echo "<td><input type=text size=25 name=phone value=\"$row[phone]\"></td></tr></form>"; echo "<form name=remove method=post action=\"remove_entry.php\">"; echo "<td><input type=submit name=remove value=\"Remove Entry\"></td>"; echo "</form></tr></table>"; This is the code for the remove_entry.php page: $result = mysql_query("DELETE FROM directory WHERE realname='$realname'") ") or die (mysql_error()); - I'm not receiving an error, but it is going to the end & showing 'removal successful!' but the row is not deleted from the database. Can someone tell me where I'm going wrong? Thank you in advance! Andrea __________________________________________________ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php