You have a bad quote ordering. You can use curly bracers, to escape the variables:
mysql_query("INSERT INTO pending
(name, alter, mail, kd, steam, spiele)
VALUES
('{$_POST['name']}', '{$_POST['alter']}', '{$_POST['mail']}', '{$_POST['kd']}', '{$_POST['steam']}', '{$_POST['spiele']}')");
From the docs:
Complex (curly) syntax
This isn't called complex because the syntax is complex, but because
it allows for the use of complex expressions.
Any scalar variable, array element or object property with a string
representation can be included via this syntax. Simply write the
expression the same way as it would appear outside the string, and
then wrap it in { and }.
To further explain, we have two variables:
$fruit = 'Orange';
$sentence = "$fruits are my favorite fruit";
What I'm trying to get is: Oranges are my favorite fruit. However, this won't work. PHP will instead be looking for a variable called $fruits, and when it doesn't find it, it'll show an error.
So to complete the task properly, we have to wrap the variable in curly braces { }:
$fruit = 'Orange';
$sentence = "{$fruit}s are my favorite fruit";
Great! Now PHP will know where the variable name ends and the string starts.
P.S. I recommend using mysqli.
I'm not quite sure I have the rights to write this here, but I looked at your code & I noticed a problem:
You are using mysql_* which is deprecated since PHP 5.5.0.
This extension is deprecated as of PHP 5.5.0, and will be removed in
the future.
Instead of mysql_* you can use PDO or MySQLi.
Here is a simple example of using MySQLi:
$mysqli = mysqli_init();
$mysqli->real_connect($db_host, $db_user, $db_pass, $db_name);
Then you can prepare your query:
$stmt = $mysqli->prepare("insert into table values(?, ?)");
Bind the params:
$stmt->bind_param("is", $param1, $param2);
We say that the first variable $param1 is an integer and $param2 is a string.
The last thing we need to do is to assign to those variables some values and execute the statement.
$param1 = 1;
$param2 = "somestring";
$stmt->execute();
$_POSTvalues in {} braces, and perform sanitation before you put them in your query, otherwise you will be vulnerable to SQL injection attacks