You should check the MySQL documentation when you get an error code to see what the error code means:
http://dev.mysql.com/doc/
Apparently the error means that mysql could not parse your query because the syntax of the query isn't proper SQL syntax. this can happen if either $name or $what has a single quote in it...like this:
$query = "insert into softserve_user
(name, homepage) values
('Here's some syntax that is broken','http://foo.bar.com')";
the basic idea is that the apostrophe in "Here's" makes MySQL think that your value for name has ended and then all the text after it doesn't look like proper sql syntax.
You should escape any text fields with mysql_real_escape_string() before sticking them in a query -- ESPECIALLY if that text comes from user input because if you don't, people can easily do SQL INJECTION on your database. google it if you don't know what i'm talking about.
Try echoing the query to see what query is actually trying to run and maybe let us see it? OR try queries like this:
$query = "insert into softserve_user
(name, homepage)
values
('" . mysql_real_escape_string($name) . "', '" . mysql_real_escape_string($homepage) . "')";
the other query had no quotes around $what. that would probably never work if $what was text.
$query = "select px_x from softserve_object where number=$what";
try this instead
$query = "select px_x from softserve_object where number='" . mysql_real_escape_string($what) . "'";