First of all, you are better off using a PDO (as Lior suggested) or an intermediate layer (encoded by you) between your code and the database functions provided by PHP, so that you can easily modify mysql using mysqli or whatever, re-edit the whole code.
Unlike the differences, mysqli has more functionality (there are many new features), as well as object-oriented.
source share