could you please tell me why my SQL-Injection isn't working and how can I fix it. I tried to go after the example from Here, but value'); DROP TABLE table;-- or password 1=1 doesn' work. Im sorry to steal your time with these easy things, but I tried it many times and I didn't get it running and the other post didn't help me.
<!DOCTYPE html>
<html>
<head>
<style>
body {background-color: #cc0000;}
</style>
</head>
<body>
<h2>Einlogen</h2>
<form action="EasyExploit.php" method="post">
Vorname: <input type="text" name="vorname"><br>
<input type="submit">
<h2>Registrieren</h2>
<form action="EasyExploit.php" method="post">
Vorname: <input type="text" name="vorname"><br>
<input type="submit">
<?php
$connection = mysqli_connect('localhost', 'root','' ,'DB') or die(mysqli_error());
mysqli_select_db($connection ,'DB')or die(mysqli_error());
@$unsafe_variable = $_POST['vorname'];
mysqli_query($connection, "INSERT INTO `Persons` (`Vorname`) VALUES ('$unsafe_variable')");
?>
</body>
</html>
Thank's in Advance