Question: Error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' WHERE username=32112' at line 1

PHP code:

```
mysql_query ("SELECT * FROM '$iAccount_table' WHERE username=$user") or die(mysql_error());

```

Answer: 
Use **`** instead of **'** with the $iAccount\_table variable. Its erroring out because of that. 

Update:

```

mysql_query ("SELECT * FROM `$iAccount_table` WHERE username=$user") or die(mysql_error());

```
I assume that 'username' is a text/char field in your db. Try this code:

```
mysql_query ("SELECT * FROM " . $iAccount_table . " WHERE username='" . $user . "'") or die(mysql_error());

```

I hope you find this helpful.