I have a script that runs when a person submits information on my index. The script is suppose to allow you to update a mysql entry or delete it. Right now, my dilemma is that I want it to be able to check to see if the entry is actually a valid entry within the table. That is I want the POST data to actually reflect the name of a certain entry.
If that there is no exact match, then I want to return a statement that says "Entry does not exist"
I tried alot of things, but I left the code at my work. If anyones willing to help given this somewhat vague info, it would be greatly appreciated. Otherwise, I will just post the code I have tommorow
from what I remember, I have the post data stored into a variable. I guess what I need is a statement that checks that variables data against the MySQL query. and if it is exactly the same, then execute the script.
my query to delete data KINDA looks like this based on my memory:
$query="DELETE FROM entry WHERE concat(f_name,' ',l_name) = '".$s_name."' ";
mysql_query($query);
Well, the delete works, if it matches up, but if it doesnt then it doesnt say anything. can anyone help me fix this?