0
 <?php
    $host = 'localhost';
    $user = 'root';
    $pass = 'faceface';
    $dbname = 'medi'; 
    //mengubung ke host
    $connect = mysql_connect ($host, $user, $pass) or die(mysql_error());
    $select  = mysql_select ($dbname) or die(mysql_error());

$ICNo=$_GET['ICNo'];
$query="SELECT * from patient where ICNo = $ICNo";
$result= mysql_query($connect, $query);

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\medicare\view_patient.php:451 Stack trace: #0 {main} thrown in C:\xampp\htdocs\medicare\view_patient.php on line 451

Can someone help me out from this. Here is the coding and the error.When i run this code it will appear an error which i cannot solve it till now.Hope someone can help me to solve this coding.

kannan D.S
  • 1,077
  • 2
  • 17
  • 41

1 Answers1

0
<?php 
 $host = 'localhost';
    $user = 'root';
    $pass = 'faceface';
    $dbname = 'medi';
$connect = mysqli_connect($host,$user,$pass,$dbname);


$ICNo=$_GET['ICNo'];
$query="SELECT * from patient where ICNo = '$ICNo'  ";
$result = mysqli_query($connect,$query);


?>
owais latif
  • 51
  • 1
  • 2
  • 14