Hi.
$result = mysql_query("insert into $table values set id=$id, user='$user', pass='$pass'");
if (!$result)
echo mysql_error();
Notice I've omited the quotes in the id filed, because it's a number type field for sure.
And I've also used doubled quotes to delimit the statement in order to parse the variable, not the literals.
That shuld work fine.
Consider learning about encryption for the pass.
Good luck.