Well first
$listPK = "SELECT listPK from liste WHERE name = '$name';";
should look like
$listPK = "SELECT listPK from List WHERE name = '$name'";
like rawk said second
You choose from liste, but the name of your table in the chart Listwith capital L
make sure that
and still not debugging like echo$ listPK
EDIT
$listPK = "SELECT listPK from list WHERE name = '$name';";
$listRes = mysql_query($listPK);
Problemis that you are not accepting the primary key value in your $ listRes, as you said you were getting resource # 19 something
you need to accept the primary u value to do something like this
while ($row = mysql_fetch_array($listRes))
{
foreach ($_POST['addUser'] as $check) {
mysql_query("INSERT INTO inList (`user`, `list`) VALUES ('$check', '$row['listPK']');");
}
}
but I really want to say that if you are doing the project yourself, go to mysqli or PDO
, :)