In PHP the data retrieved from a database table is stored in, I would guess, temporary RAM memory as an array and not in an actual physical file on the hard disk. The 'EOF' & 'BOF' sounds C-ish to me. I've only seen anything like that in PHP when working with file functions.
When you use mysql_fetch_array() the function assembles and returns an array based on the query that you requested, assuming that your query was formatted properly and you have a valid connection to the database. If the optional second argument (a constant) is left off the array will contain both numeric and associative indices. The numeric indices will correspond to the field order as they appear in your table using the wildcard selector (*) or the order that they appear in your query when you specify the field names explicitly. The associative indices will be the names of the fields themselves.
http://www.php.net/mysql_fetch_array
Using mysql_fetch_array in addition with the while loop will iterate through all of the results found in the specified query begining with the first row set (beginning of array, invisible array pointer set to zero) and ending when the last row has been reached.
So:
while($query_data=mysql_fetch_array($res))
{
echo $query_data['username'];
}
This would expect a field named 'username' in your selected database table.
You can try something like this to see everything being brought back by mysql_fetch_array
while($query_data=mysql_fetch_array($res))
{
echo "<pre>";
echo print_r($query_data);
echo "</pre>";
}
This will print out a human-readable summary of how the array is structured like so:
Array
(
[0] => "value"
)
The parse errors that you are getting are errors in the way that you've written your PHP syntax. The interpreter is choking because you have forgotten a quotation, or forgot to escape one, or something along those lines, or perhaps left off a semi-colon.
Tell me a little more about how you have your table set-up and I can better demonstrate to you how to retrieve data from it.
Are you able to verify your mysql connection?
: )
Rich
:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::