$insert = "INSERT INTO `people` (" . $key . ") VALUES ('" . $value . "')"; mysql_query($insert, $conn) or die(mysql_error());