(I realise this is old, but it still comes up...)
If you do replace mysql_* with mysqli_* then bear in mind that a whole load of mysqli_* functions need the database link to be passed.
E.g.:
mysql_query($query)
becomes
mysqli_query($link, $query)
I.e., lots of checking required.