Does not enter information into the database from the form

Here is the code:
if (isset($_POST[‘city’]))
{
$city = ($_POST[‘city’]);
$city = $city;

$query = "SELECT * FROM profiles WHERE user='$user'";
if (mysql_num_rows(queryMysql($query)))
{
    queryMysql("UPDATE profiles SET user='$user' 
                where city='$city'");
}
else
{
    $query = "INSERT INTO profiles VALUES('$user', '$name', '$surname', '$city', '$age', '$site', '$icq', '$skype', '$vk', '$twit', '$about')";
    queryMysql($query);
}

}
else
{
$query = “SELECT * FROM profiles WHERE user=’$user'”;
$result = queryMysql($query);

if (mysql_num_rows($result))
{
    $row  = mysql_fetch_row($result);
    $city = $row[3];
}
else $city = "";

}

$city = $city;

Here is the form code;

< form method='post' action='profile.php'
    enctype='multipart/form-data'>
: < input type='text' maxlength='64' name='name' value='$name' /><br />
: < input type='text' maxlength='64' name='surname' value='$surname' /><br />
: < input type='text' maxlength='64' name='city' value='$city' /><br />
: < input type='text' maxlength='64' name='site' value='$site' /><br />
ICQ: < input type='text' maxlength='64' name='icq' value='$icq' /><br />
Skype: < input type='text' maxlength='64' name='skype' value='$skype' /><br />
: < input type='text' maxlength='64' name='vl' value='$vk' /><br />
Twitter: < input type='text' maxlength='64' name='twit' value='$twit' /><br />
: < input type='file' name='image' size='14' maxlength='32' /><br />
< input type='submit' value='' />
< /form>

P.S. Other information is entered normally, except for this one


Answer 1, authority 100%

Learn operator syntax

INSERT INTO profiles (`USER_COL`, `NAME_COL`) VALUES('$user', '$name')

Answer 2, authority 100%

queryMysql ???

learn the syntax. mysql_query(QUERY);

if (isset($_POST['city'])) { $city = ($_POST['city']); $city = $city;

why $city = $city;

queryMysql("UPDATE profiles SET user='$user' 
            where city='".$city."'");