I want to insert data from a form into a table but everytime i hit submit nothing happens, i checked and re-checked everything but i can't find the reason.
indextest1.php
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="UTF-8">
<meta name="author" content="">
<meta name="description" content="">
<meta name="keywords" content="">
</head>
<body>
<form action="test1.php" method="post">
<input type="text" name="name"><br>
<input type="text" name="lastname"><br>
<input type="radio" name="radio" value="one" checked> one<br>
<input type="radio" name="radio" value="two" > two<br>
<select name="drop">
<option value="0" selected>0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
</select>
<input type="checkbox" name="check" value="1"><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
test1.php
<?php
$servername = "localhost";
$username = "root";
$password = "root";
$dbname = "db-test";
$connect = ("$servername, $username, $password, $dbname") or die ("ERROR DURING CONNECTION");
$name = $_POST["name"];
$lastname = $_POST["lastname"];
$radio = $_POST["radio"];
$drop = $_POST["drop"];
$check = $_POST["check"];
$sql_insert = mysql_query("INSERT INTO test-table (id, name, lastname, radio, drop, check) VALUES ('', '$name', '$lastname', '$radio', '$drop', '$check')");
header("location: indextest1.php");
?>
Table values
Thanks in advance, i hope i provided all the info needed.

idshouldn't be defined in the insert query as it's probably an auto increment field. Also, your code is vulnerable to SQL injection, I'd recommend escaping any funny chars by doingmysql_real_escape_string()mysql, it is deprecated, usemysqli. You're usingmysql_querywrong and you're defining your connection wrong. (You needmysqli_connect).