-1

Hi i have MySQL connection on PHP 4.6

and I need to change to the latest version

but I want to still use the user class even if I make a few changes

this code was made base on Lynda advance PHP corse

#

This is the error that is shows

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/web360-tech.cloud/public_html/includes/database.php:39 Stack trace: #0 /home/web360-tech.cloud/public_html/includes/database.php(23): MySQLDatabase->open_connection() #1 /home/web360-tech.cloud/public_html/includes/database.php(171): MySQLDatabase->__construct() #2 /home/web360-tech.cloud/public_html/includes/initialize.php(14): require_once('/home/web360-te...') #3 /home/web360-tech.cloud/public_html/index.php(2): require_once('/home/web360-te...') #4 {main} thrown in /home/web360-tech.cloud/public_html/includes/database.php on line 39

##

here is the git repo Git repo

thanks how I get some help

  • Possible duplicate of [Undefined function mysql\_connect()](https://stackoverflow.com/questions/13825108/undefined-function-mysql-connect) – Spoody Apr 29 '18 at 19:59

1 Answers1

1

mysql_connect deprecated in PHP 5 and removed in PHP 7, Use mysqli or PDO

http://php.net/manual/en/book.mysqli.php

http://php.net/manual/en/book.pdo.php

Anfath Hifans
  • 1,560
  • 1
  • 9
  • 18