When i am to delete one message all of the messages in my guestbook gets deleted. I changed $row[id] to a number and then only one row is deleted. However then of course i cant delete more than one row. If anyone knows what i´ve done
wrong i would appricate it.
PHP:
$query = "DELETE FROM guestbook WHERE id = $row[id] ";
Well what do you want the query to do?
If you don't specify the id in the WHERE clause, then it will delete all rows. IF you use the WHERE clause and specify the id, it will delete any row that has that id. the ID is probably unique which means only one row has that ID.
If you want to delete all messages from johdoe@yahoo.com they you would use this query:
DELETE FROM guestbook WHERE email = 'johndoe@yahoo.com'
Every row where guestboook.email = johndoe@yahoo.com will be deleted.
Please be more specific about what the app does, and what you want it to do if you still need help. And please post some code.