I have the following code in my website and it is supposed to delete a user account along with all associated records, however it doesn't delete any of the records, the function is working, beacuse I also have a logout function that gets called afterwards that is working, it just seems to be skipping the delete commands.
Here is my code:
P.S. I can't provide a link to the website as it isn't online yet.
Here is my code:
Code:
function delacc(){ $retrievedusr = $_COOKIE['usrid']; $dsql1 = "DELETE FROM mpw_3_5_test_dbase_users WHERE username = $retrievedusr"; $dresult1 = mysql_query($dsql1); $dsql2 = "DELETE FROM mpw_3_5_test_dbase_usc WHERE username = $retrievedusr"; $dresult2 = mysql_query($dsql2); $dsql3 = "DELETE FROM mpw_3_5_test_dbase_notes WHERE username = $retrievedusr"; $dresult3 = mysql_query($dsql3); logout(); }
Comment