I\'m pretty sure this question has been asked many times, I\'ve searched the web and still can\'t figure out the solution to this problem.
Here\'s the code (I know it is
its your SQL
DELETE FROM `transaction` where `name` = $testyname
will likely work better
Your SQL is wrongly formatted (quotes in wrong places). I've added some comments in this improved code, check it out.
mysql_query("SELECT * FROM testimony"); //this line is useless and you can delete it
mysql_query("DELETE FROM transaction WHERE name = '".$testyname."'"); //this line contained wrong syntax
Please note that mysql_ functions are deprecated in new versions of PHP. Check this post on more info on this subject.
Also you might want to prevent SQL injection in the $testmyname
variable. This guide will help you with tat.