PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
$sql = 'SELECT `username`, `posts`, `theme` FROM `'.$prefix.'chat_prefs` WHERE `username` = '''.$_GET[userinfoname].''' LIMIT 1';
$result = mysql_query($sql) or die("Query 1 Failed ". mysql_error());
$userinfo[] = mysql_fetch_array($result);
mysql_free_result($result);
?>
But it gives me this error: [] Operator not supported blablabla. I had it echo $sql and I did the query via phpMyAdmin and it got the whole table fine. But if I tried to do mysql_result() i would get the first cell in the row. Any ideas?