Warning: mysql_fetch_array() expects parameter 1 to be resource, string given in C:\\xampp\\htdocs\\test\\index.php on line 19
Your parameter to mysql_fetch_array() function is your SQL statement string. This is what your warning say. You should first use $res = mysql_query($sql); and pass $res as parameter to mysql_fetch_array()