I'm a new user of PHP and SQL.
For some reason I can't extract database values running mysql_fetch_row or similar.
I created a mysql table with 6 fields, and try to access some of the data running the following statements:
$query = "SELECT recruit_id from recruits WHERE recruits.type = 'FT'";
$result = mysql_query($query) or die ("Error in query: $query. " . mysql_error());
while(list($id, $lname, $fname) = mysql_fetch_row($result))
{
echo "<li>$row[f_name] $row[l_name] email: $row[email]";
}
Yet only $id is the only variable that has a returned value. I get an undefined offset error message. Does anyone know what I could be doing wrong?
thanks,
Dare