As mentioned in comments mysql_ is deprecated and has been removed from PHP 7.
The possible reason it's saying mysql_connect is undefined is because your host must be using latest PHP version (PHP 7) or is blocked by default from using mysql_. If you want, you can enable it (I will not recommend it).
Go to your cPanel -> Select PHP version ->
//There will be several checkboxes. Tick MySQL to enable it.
![Enter image description here]()
This method is for cPanel only. I am not sure about others host or Plesk.
You can change your host (Bigrock) PHP version as mentioned here.
Instead of mysql_ you can use mysqli_:
$conn = mysqli_connect($localhost, $username, $password, $db_name);
You can learn more about mysql_, mysqli_, and PDO at Choosing an API.