ini_set("display_errors", "1"); error_reporting(E_ALL); include("dbinfo.php"); mysql_connect('localhost',$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $qury="SELECT * FROM feedback ORDER BY date DESC LIMIT 1"; $rsult=mysql_query($qury); $num=mysql_numrows($rsult); mysql_close(); $i=0; while ($i < $num) { $urn=mysql_result($rsult,$i,'urn'); echo "$urn"; ?> $i++;} ?> ini_set("display_errors", "1"); error_reporting(E_ALL); include("dbinfo.php"); mysql_connect('localhost',$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query = "SELECT AVG(rating) FROM feedback"; $result = mysql_query($query) or die(mysql_error()); // Print out result while($row = mysql_fetch_array($result)){ echo "Customer feedbacks with an average rating of: ".$row['AVG(rating)']; echo "
"; } ?>
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /var/www/html/birdmancomputers.com/html/view.php:48 Stack trace: #0 /var/www/html/birdmancomputers.com/view.php(41): include() #1 {main} thrown in /var/www/html/birdmancomputers.com/html/view.php on line 48