I'll jump straight into it. Using php I'm having a problem deleting a record from the database if i use a variable as the value. The line of code below works perfectly
mysqli_query($con,"DELETE FROM highScores WHERE Name='David'");
But the name of the user will change, therefore I need to declare it as a variable. I've tried all kinds of variations but nothing seems to work. My latest failed attempt was the code below, which is the way i declare a varible when i'm inserting.
mysqli_query($con,"DELETE FROM highScores WHERE Name='{$name}'");