How did query (line 20) end up after fetch (line 17)?
The second error. Could be an sql syntax error. Or maybe a wrong column name, table name, database name...
Also, I'm not sure you can use $rows['name'] after mysql_fetch_row($result). You might need to use mysql_fetch_assoc($result). Other wise stick to $row[number]. Probly depends on php version.
// Here is what I think you should have.
mysql_connect('something','something','something'); // needs perfect
$table_name='the exact table name case sensitive'; //needs perfect
$search="Damien"; // case sensitive and exact match
$column='some column to search';
$sql="SELECT * FROM '$table_name' WHERE $column='$search' "; // varies per database
// somecolumn is whatever you named the column your searching, needs exactness
$query=mysql_query($sql); //don't forget semicolon
while ( $row=mysql_fetch_assoc($query) ) {
// no semicolons in while()
print $row['somecolumn'];
print " <br> \n "; // html break, and php return
}
// if there were 10 Damien then it would print all of them.
// if there is 10 damien then it would print none of them.
// copy and paste all of this and change the 'somethings'
// hahahaha. computers love to waste time.
//
//By the way, once you get it to work. Save it to a txt file so you can cut and paste //wherever you need to hit the database. Then forget about it forever, or it will plague
// you again and again. Muhahaha