FIXED: I had the $link, $sql in the wrong order. $result = mysqli_query($sql,$link) << wrong. Gordon.