enter the code here I am creating an autocompletable search with json, mysql and php but it shows me this error:
Fatal error: Uncaught Error: Call to undefined function mysql_connect () in C: \ xampp \ htdocs \ Times \ pages \ log1.php: 2 Stack trace: # 0 {main} thrown in C: \ xampp \ htdocs \ Schedules \ pages \ register1.php on line 2
the consultation is fine, I appreciate your help.
<?php
$con = mysql_connect("localhost", "root", "");
mysql_select_db("cursos", $conxion);
$result = mysql_query("SELECT * FROM usuarios WHERE tipousuario='Docente' ORDER BY nombre ASC", $con);
$array = array();
if($result){
while ($row = mysql_fetch_array($result)) {
$equipo = utf8_encode($row['nombre']);
array_push($array, $equipo);
}
}
?>