-1

I'm getting this error in server but in not in localhost,what will be the problem..?

Here is my code:

<?php
$host="localhost"; // database server name
$dbname="*****";   // database name
$dbuser="*****";   // database user name
$dbpassword="*****"; // database password


mysql_connect($host, $dbuser, $dbpassword) or die(mysql_error());
mysql_select_db($dbname) or die(mysql_error());
?>
B001ᛦ
  • 2,036
  • 6
  • 23
  • 31
arun kumar
  • 85
  • 1
  • 7

1 Answers1

0

mysql_connect : Warning This extension is deprecated as of PHP 5.5.0, and will be removed in the future.

Anyway, you need to install the php5-mysql package.

Debian/ubuntu:

apt-get update && apt-get install php5-mysql