Линия, вызывающая ошибку, – это …
mysql_close($con);
Вот полный код …
$con=mysqli_connect("localhost","root","pass","db_name"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $result = mysqli_query($con,"SELECT * FROM medicos"); while($row = mysqli_fetch_array($result)) { echo '.....'; } mysql_close($con);