$result = mysql_query($sql)
$row = mysql_fetch_array($result);
mysql_query will only return a result handle
result is not useful, unless you fetch
$row = mysql_fetch_array($result);
will fetch one row, which is an array of values
$row['name'], $row['email'] or whatever was selected
next time we run
$row = mysql_fetch_array($result);
it will take next row from $result
... and so on
in this case there is only 1 row in $result, so we need NOT loop with while()
if we loop
while( $row = mysqlfetcharray($result) ){
do something with this row
}
it will fetch all rows, one by one, until end of $result