Hi Andrea,
> 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 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?
Is the value in $realname debug ECHOed prior to the query call?
Is there a check on the number of rows affected by the DELETE, after the call?
Why not post the code from the query preparation through to the 'removal succesful'
msg - which must be
something you've written and is possibly where the/another problem lies?
Regards,
=dn
PS (so the purists don't shoot you down: you do know there's a separate PHP list and a
PHP-DB specific list,
don't you?
---------------------------------------------------------------------
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